Skip to main content
Source Code: src/gaia/mcp/
Import: from gaia.agents.base.mcp_agent import MCPAgent

Detailed Spec: spec/mcp-server

8.1 MCP Agent Base

Purpose: Base class for Model Context Protocol compatible agents.

8.2 MCP Server

Import: from gaia.mcp.agent_mcp_server import AgentMCPServer

8.3 Code Index MCP Server

Import: from gaia.mcp.servers.code_index_mcp import CodeIndexService, create_code_index_mcp Exposes CodeIndexSDK for one repository, so Claude Code, Cursor, or any MCP client can search the code by meaning. Embeddings run on the local Lemonade Server; nothing leaves the machine. Requires the [mcp] and [rag] extras. From the CLI (stdio):
The first rebuild_index embeds every file and can take minutes on a large repository; later calls reuse unchanged files. Until an index exists, search_code returns an error that says to call rebuild_index. Only one rebuild runs at a time, and searches keep using the previous index while it does. The server refuses to start on your home directory. From Python: