Move completed plan documents to docs/plans/completed/ with concise completion summaries alongside the originals. Archived: MCP integration, Go API design/plan, CLI meta-package design. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
MCP Integration — Completion Summary
Completed: 2026-02-05
Plan: docs/plans/2026-02-05-mcp-integration.md
What Was Built
RAG Tools (pkg/mcp/tools_rag.go)
Three MCP tools added to the existing pkg/mcp server:
rag_query— semantic search against Qdrant vector DBrag_ingest— ingest a file or directory into a named collectionrag_collections— list available Qdrant collections (with optional stats)
Metrics Tools (pkg/mcp/tools_metrics.go)
Two MCP tools for agent activity tracking:
metrics_record— write a typed event (agent_id, repo, arbitrary data) to JSONL storagemetrics_query— query events with aggregation by type, repo, and agent; supports human-friendly duration strings (7d, 24h)
Also added parseDuration() helper for "Nd"/"Nh"/"Nm" duration strings.
core mcp serve Command (internal/cmd/mcpcmd/cmd_mcp.go)
New CLI sub-command registered via cli.WithCommands() (not init()).
- Runs
pkg/mcpserver over stdio by default - TCP mode via
MCP_ADDR=:9000environment variable --workspaceflag to restrict file operations to a directory
Registered in the full CLI variant. i18n strings added for all user-facing text.
Plugin Configuration
.mcp.json created for the agentic-flows Claude Code plugin, pointing to core mcp serve. Exposes all 15 tools to Claude Code agents via the core-cli MCP server name.
Key Outcomes
core mcp serveis the single entry point for all MCP tooling (file ops, RAG, metrics, language detection, process management, WebSocket, webview/CDP)- MCP command moved to
go-ai/cmd/mcpcmd/in final form; the plan'sinternal/cmd/mcpcmd/path reflects the pre-extraction location - Registration pattern updated from
init()+RegisterCommands()tocli.WithCommands()lifecycle hooks - Services required at runtime: Qdrant (localhost:6333), Ollama with nomic-embed-text (localhost:11434)