Page:
MCP-Server
No results
2
MCP-Server
Virgil edited this page 2026-02-19 18:35:23 +00:00
Table of Contents
MCP Server
The MCP (Model Context Protocol) server is the core of go-ai. It exposes AI capabilities as tools that agents and IDEs can call.
Protocol
Implements the Model Context Protocol v1.3.0 via the official Go SDK.
Transports: stdio (default), TCP, Unix socket
# stdio (for Claude Code, IDEs)
core mcp serve
# TCP (for network access)
MCP_ADDR=:9000 core mcp serve
Tool Subsystems
Each subsystem registers its tools with the MCP server:
| Subsystem | Tools | Source |
|---|---|---|
| ML | Model inference, scoring | Imports go-ml |
| RAG | Query, ingest, collections | Imports go-rag |
| Metrics | Record, query, summary | Local (ai/metrics.go) |
| Process | Start, stop, list, output | Uses core/go/pkg/process |
| WebView | Navigate, click, screenshot | Uses core/go/pkg/webview |
| WebSocket | Start hub, subscribe | Uses core/go/pkg/ws |
Subsystem Interface
type Subsystem interface {
Name() string
RegisterTools(server *Server)
}
Subsystems are composable — the MCP server discovers and registers all available subsystems at startup.
IDE Bridge
The mcp/ide/ package provides IDE-specific tooling:
- bridge.go — Bridges MCP tools to IDE commands
- tools_build.go — Build/compile actions
- tools_chat.go — In-IDE chat with AI
- tools_dashboard.go — Project dashboard metrics