MCP Integration

Extend aidaemon with any Model Context Protocol server to add filesystem access, databases, APIs, and more.

How It Works

  1. aidaemon spawns each configured MCP server as a subprocess
  2. Communicates via JSON-RPC 2.0 over stdin/stdout
  3. Calls tools/list to discover available tools
  4. Each discovered tool is wrapped as a native aidaemon Tool
  5. 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: initialize request → 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.