Skip to content

Add MCP tools for links, applications, and feeds - #169

Merged
ruibaby merged 4 commits into
mainfrom
feat/mcp-tools
Oct 12, 2026
Merged

ruibaby merged 4 commits into
mainfrom
feat/mcp-tools

Conversation

@ruibaby

@ruibaby ruibaby commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Expose link management through 26 MCP tools, allowing AI clients to manage links and groups, review link applications, and read or manage feed items through the plugin's existing business services.

Console category Tools Capabilities
友链申请 6 List, inspect, verify, approve, reject, and delete applications
友链订阅 6 Discover feeds, list cached articles, view counts, refresh feeds, update article state, and mark articles as read
友链管理 14 Create, query, update, delete, move, and sort links; manage groups; fetch website metadata; request link checks

All tools include Chinese Console titles and descriptions, explicit input and output schemas, and operation annotations. MCP Server enforces per-key tool allowlists. Application responses omit applicant email and commenter identity fields.

The tools reuse existing approval, verification, fetching, and feed services. Updates preserve omitted fields, batch operations require an explicit scope and return per-item results, and link checks return acceptance of asynchronous work. Usage and behavior are documented in dev/mcp.md.

Compatibility

MCP Server is optional. To use these tools, install MCP Server >=1.3.0 and <2.0.0; version 1.3.0 provides the custom category API used by the three groups above.

Compile and test dependencies use the released run.halo.mcpserver:api:1.3.0 artifact from Maven Central. Providers are registered conditionally, and the plugin JAR does not bundle MCP API or SDK classes. The links plugin can start without MCP Server installed.

Validation

  • Java 21 ./gradlew clean build passed against the published API 1.3.0: all 452 backend tests passed, including 83 MCP tests. CI passed on the latest commit.
  • Tests cover provider registration, category counts, input validation, entity validation, successful output schemas, partial updates, approval behavior, batch conflicts, and feed operations.
  • Verified the packaged optional dependency requirement and absence of bundled MCP API/SDK classes; git diff --check passed.
  • Runtime checks on the category-enabled MCP Server test build exercised all 26 tools over /mcp in 49 calls, with 60 checks and 40 successful-response schema validations. Confirmed the 6/6/14 category counts and startup without MCP Server. Temporary test resources and keys were cleaned up.

Runtime checks used the MCP Server test build, not the released 1.3.0 server. Network-fetch success paths remain unverified because the test container resolves public domains to proxy Fake-IP addresses blocked by Halo's secure HTTP client; the runtime checks include expected failure paths.

@ruibaby
ruibaby marked this pull request as ready for review October 10, 2026 15:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T15:17:48.168671Z 9c9978f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ruibaby
ruibaby merged commit 2c407b4 into main Oct 12, 2026
1 check passed
@ruibaby
ruibaby deleted the feat/mcp-tools branch October 12, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant