feat: MCP server — codebase intelligence tools for Claude Code - #10
Merged
Conversation
Implements #9: ArbiterX as a local stdio MCP server. Tools exposed: - arbiterx_query(query) — search symbols in the codebase map - arbiterx_overview() — project structure, languages, top symbols - arbiterx_gate(code, language) — score code quality 0-100 - arbiterx_file_symbols(file_path) — list symbols in a specific file Integration: - .mcp.json at plugin root for auto-discovery by Claude Code - CLI subcommand: arbiterx mcp-serve (stdio transport) - Always-on skill updated to instruct AI to use MCP tools first - Uses CLAUDE_PROJECT_DIR env var to find .arbiterx/map.db Architecture: - Uses FastMCP from the 'mcp' package - Runs as stdio transport (local process, no network) - Single-process, reads from existing SQLite map - Falls back gracefully if no map exists Install: pip install arbiterx-gate[mcp] Closes #9
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
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 #9: ArbiterX as a local MCP server so Claude Code can query the codebase map directly instead of reading raw files.
How It Works
Tools Exposed
arbiterx_query(query)arbiterx_overview()arbiterx_gate(code, language)arbiterx_file_symbols(file_path)Files Changed
src/arbiterx/mcp_server.py— MCP server with FastMCP (stdio transport)src/arbiterx/cli.py— Addedarbiterx mcp-servecommand.mcp.json— Plugin MCP server config (auto-discovered by Claude Code)skills/arbiterx/SKILL.md— Updated to instruct AI to use MCP tools firstpyproject.toml— Addedmcpoptional dependencyUsage
Testing
pip install mcp(optional dep)Closes #9