Skip to content

feat: MCP server — codebase intelligence tools for Claude Code - #10

Merged
NeelPrime merged 1 commit into
mainfrom
feature/mcp-server
Jul 8, 2026
Merged

feat: MCP server — codebase intelligence tools for Claude Code#10
NeelPrime merged 1 commit into
mainfrom
feature/mcp-server

Conversation

@NeelPrime

Copy link
Copy Markdown
Owner

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

User: "How does payment work?"
  → Claude calls arbiterx_query("payment")
  → Returns 600 tokens of relevant signatures
  → Claude answers without reading 50 files (200K tokens)

Tools Exposed

Tool Purpose
arbiterx_query(query) Search symbols in the map
arbiterx_overview() Project structure + top symbols
arbiterx_gate(code, language) Score code 0-100
arbiterx_file_symbols(file_path) List symbols in a file

Files Changed

  • src/arbiterx/mcp_server.py — MCP server with FastMCP (stdio transport)
  • src/arbiterx/cli.py — Added arbiterx mcp-serve command
  • .mcp.json — Plugin MCP server config (auto-discovered by Claude Code)
  • skills/arbiterx/SKILL.md — Updated to instruct AI to use MCP tools first
  • pyproject.toml — Added mcp optional dependency

Usage

# Install with MCP support
pip install arbiterx-gate[mcp]

# Plugin auto-starts the server, or manually:
arbiterx mcp-serve

Testing

  • 109 tests passing
  • Lint clean
  • MCP server requires pip install mcp (optional dep)

Closes #9

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
@NeelPrime
NeelPrime merged commit 4622bcd into main Jul 8, 2026
2 checks passed
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.

[Feature]: MCP server — expose codebase intelligence as tools for Claude Code

1 participant