feat(mcp): best-in-class MCP 2025-03-26 integration — 27 tools, 20 resources, 6 prompts
Implements the full MuseHub MCP integration plan as a pure-Python async stack with no external MCP SDK dependency.
Tools (mcp/tools/): - 15 read tools: browse, commits, diffs, issues, PRs, releases, search - 12 write tools: create/fork repo, issues, PRs, releases, star, labels - MUSEHUB_WRITE_TOOL_NAMES gates JWT auth on all mutating calls
Write executors (mcp/write_tools/): - repos.py: execute_create_repo, execute_fork_repo - issues.py: execute_create_issue, execute_update_issue, execute_create_issue_comment - pulls.py: execute_create_pr, execute_merge_pr, execute_create_pr_comment, execute_submit_pr_review - releases.py: execute_create_release - social.py: execute_star_repo, execute_create_label
Resources (mcp/resources.py): - 5 static musehub:// URIs (trending, me, me/notifications, me/starred, me/feed) - 15 RFC 6570 URI templates covering repos, issues, PRs, releases, users
Prompts (mcp/prompts.py): - 6 workflow prompts: orientation, contribute, compose, review_pr, issue_triage, release_prep - MCPPromptDef, MCPPromptMessage, MCPPromptResult TypedDicts
Dispatcher (mcp/dispatcher.py): - Async JSON-RPC 2.0 engine; initialize/tools/resources/prompts methods - handle_request + handle_batch entry points
HTTP transport (api/routes/mcp.py): - POST /mcp with JWT auth, single + batch JSON-RPC body support
Stdio transport (mcp/stdio_server.py + .cursor/mcp.json): - Line-delimited JSON-RPC for local dev and Cursor IDE integration
Tests (tests/test_mcp_dispatcher.py): - 31 unit tests covering all dispatcher methods and error paths
Docs (docs/reference/type-contracts.md): - New "MCP Integration Layer" section with full type tables - Updated Entity Hierarchy tree and Diagram 4 (tool routing) - New Diagram 10: MCP transport and resource architecture
No comments yet. Be the first to start the discussion.