MCP Servers
Connect external tool servers to CrabTalk — stdio or HTTP, auto-discovered, hot-reloadable.
MCP (Model Context Protocol) servers expose tools that agents can call. Register a server in your config, and the daemon discovers its tools automatically. Add a filesystem server, a database client, a code interpreter — any MCP-compatible server works.
Configuration
Stdio transport
The daemon spawns the server as a child process:
[mcps.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/docs"]
env = { NODE_ENV = "production" }
auto_restart = trueHTTP transport
The server runs independently, daemon connects to it:
[mcps.my-api]
url = "http://localhost:8080/mcp"Use stdio for local tools. Use HTTP when the server runs on a different machine or needs to persist across daemon restarts.
Tool discovery
When the daemon starts (or when config changes are hot-reloaded), it connects to each MCP server, queries its tool schemas, and registers them in the tool registry. Agents can then call these tools like any built-in tool.
If a server is unavailable, its tools are still registered but return errors when called. The daemon doesn't crash — it degrades gracefully.
Scoping
Restrict which agents can use which MCP servers:
[agents.researcher]
mcps = ["search"] # only search tools
[agents.writer]
mcps = [] # no MCP tools at allEmpty list means access to all MCP servers.
MCP servers vs. commands
These are related but different:
- MCP servers are tool providers. The daemon connects to them and calls their tools.
- Commands (like
crabtalk search) are standalone binaries. They can be MCP servers (search is), or they can be clients that connect to the daemon (telegram is).
A command that runs as an MCP server is just a convenient way to install and manage the server binary. The MCP protocol is the same either way.
Hot-reload
Add, remove, or modify MCP server configs without restarting the daemon. Save crab.toml and the daemon picks up changes automatically.
What's next
- Build an MCP Server — create your own tool server
- Commands — cargo-style dispatch and service management
- Configuration — full config reference