MCP Integration
Extend aidaemon with any Model Context Protocol server to add filesystem access, databases, APIs, and more.
How It Works
- aidaemon spawns each configured MCP server as a subprocess
- Communicates via JSON-RPC 2.0 over stdin/stdout
- Calls
tools/listto discover available tools - Each discovered tool is wrapped as a native aidaemon
Tool - The LLM can call MCP tools the same way as built-in tools
Protocol Details
- Protocol version: 2024-11-05
- Client info: name="aidaemon", version="0.1.0"
- Transport: line-delimited JSON over stdin/stdout
- Initialization:
initializerequest โnotifications/initialized
Example
config.toml
[mcp.filesystem]
command = "npx"
args = ["-y", "@anthropic/mcp-filesystem", "/home/user/documents"]
[mcp.sqlite]
command = "npx"
args = ["-y", "@anthropic/mcp-sqlite", "my-database.db"]
[mcp.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]Error Handling
If an MCP server fails to start or list tools, the error is logged but other servers and built-in tools continue to work.