-
Notifications
You must be signed in to change notification settings - Fork 10
feat(mcp): add MCP server foundation with protocol handler and tools #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
Author
This was referenced Jan 10, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #454 +/- ##
==========================================
- Coverage 80.41% 76.54% -3.88%
==========================================
Files 85 89 +4
Lines 9370 9849 +479
==========================================
+ Hits 7535 7539 +4
- Misses 1527 2002 +475
Partials 308 308 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Jan 10, 2026
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Add basic structure for MCP server integration: - cmd/serve.go: New 'serve' command that builds index and starts server - mcp/types.go: JSON-RPC 2.0 and MCP protocol type definitions - mcp/server.go: Server struct skeleton (implementation in next commit) The serve command: - Initializes code graph (AST parsing) - Builds module registry - Builds call graph using 5-pass algorithm - Reports index stats to stderr - Starts MCP server on stdio (skeleton) Part 1/3 of MCP server PoC. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Full implementation of MCP server protocol: - stdio reader/writer with JSON-RPC 2.0 - Request dispatch to appropriate handlers - initialize: Returns server info and capabilities - initialized: Acknowledgment (no response) - tools/list: Returns 6 tool definitions - tools/call: Dispatches to tool executor Includes: - Request timing logged to stderr - Client info logging on initialize - Basic error handling for parse/method errors - get_index_info tool working for smoke testing Other tools return "not yet implemented" - full implementation in Commit 3. Part 2/3 of MCP server PoC. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Complete tool implementations for code intelligence queries: 1. get_index_info: Returns project stats (functions, edges, modules) 2. find_symbol: Finds symbols by name with metadata (type, params, decorators) 3. get_callers: Reverse call graph with call site locations 4. get_callees: Forward call graph with resolution status and type inference 5. get_call_details: Full call site info including arguments and resolution 6. resolve_import: Import path resolution with exact/short/partial matching Features: - Rich metadata in responses (file, line, return type, parameters) - Resolution status tracking (resolved vs unresolved with reasons) - Type inference information when available - Helpful error messages with suggestions - Multiple match handling with alternatives - Detailed tool descriptions with examples for AI assistant usage Part 3/3 of MCP server PoC. Ready for agent integration testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
d1c55ac to
8dab96e
Compare
Owner
Author
Merge activity
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary
Implements Model Context Protocol (MCP) server for AI coding assistant integration.
Key features:
get_index_info,find_symbol,get_callers,get_callees,get_call_details,resolve_importpathfinder servecommand for stdio transportTools provided:
get_index_infofind_symbolget_callersget_calleesget_call_detailsresolve_importDesigned for Claude Code, Codex CLI, and other MCP-compatible assistants.