docs/guides/mcp-tools-for-ai-agents.md
nanobot can connect MCP servers and expose their tools to the agent alongside built-in file, shell, web, cron, image generation, and subagent tools.
config.jsonUse MCP when a tool already exists as an MCP server, when another application publishes an MCP adapter, or when you want a clean boundary between nanobot and external tool logic.
python -m pip install nanobot-ai
nanobot onboard --wizard
nanobot agent -m "Hello!"
Install the MCP server's own runtime separately. For example, many local MCP
servers use npx or uvx.
Add a stdio MCP server to ~/.nanobot/config.json:
{
"tools": {
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"],
"enabledTools": ["read_file"]
}
}
}
}
Restart nanobot, then ask a question that needs the MCP tool.
enabledTools to expose only the tools the agent actually needs.toolTimeout for slow MCP servers.tools.ssrfWhitelist entry.nanobot gateway --verbose and check MCP startup logs.