DR-008: MCP Server Architecture for AI Integration
Status
- [x] Accepted
- [ ] Proposed
- [ ] Rejected
- [ ] Deprecated
- [ ] Superseded
Date: 2024-12-15
Context
Claude Code and other AI systems need programmatic access to repository operations (modules, dependencies, files, builds, tests) through structured interfaces.
Problem: How to bridge AI agents and repository operations?
Decision
Model Context Protocol (MCP) server exposing EAC commands as AI-accessible tools via stdio protocol.
Architecture:
- Stdio-based MCP server (
go/eac/mcp/commands) - Dynamic tool generation from command definitions
- Tool naming:
mcp__commands__<command-name> - Output formats: YAML/JSON for machine consumption
Dual Execution Model:
- CLI mode: Human-readable tables and summaries (
r2r eac show modules) - MCP mode: Structured data for AI parsing (
mcp__commands__get-modules)
Claude Code Integration (.claude/):
- 6 specialized agents (go-architect, go-debugger, go-test-engineer, go-cli-ux, go-security-release, go-workflow-engineer)
- 3 skills (go-cli-feature, go-cli-release-check, go-cli-refactor-safe)
- 8 slash commands (/go:plan, /go:implement, /go:test, /go:review, /go:debug, /go:release, /go:cli-docs, /go:session-end)
MCP Configuration (.mcp.json):
{
"mcpServers": {
"commands": {
"type": "stdio",
"command": "go",
"args": ["run", "./go/eac/mcp/commands/main.go"]
}
}
}
Consequences
Positive: AI-native workflows, reusable integration, structured data exchange, unified command interface, context-aware operations
Negative: MCP server maintenance, dual output complexity, stdio protocol limitations
Alternatives Considered
- REST API: Rejected - overkill for local tools, server overhead, authentication complexity
- Language Server Protocol (LSP): Rejected - focused on code editing, not repository operations
- Custom JSON-RPC: Rejected - MCP is emerging standard, better ecosystem support
Related Decisions
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.