What's Changed
- Feature: add MCP server support (stdio + HTTP transports) (thanks to @Fybre)
New Features
Picobot now supports MCP (Model Context Protocol) servers as agent tools! 🎉
Connect any MCP-compliant server and its tools are automatically registered in the agent at startup — no code changes required.
One-time setup
Add an entry to ~/.picobot/config.json under mcpServers:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}MCP Tools and Transports
Supported Transports
1. Stdio - Spawns a local process and communicates over stdin/stdout. Works with npx, uvx, plain binaries, and docker run.
{
"mcpServers": {
"via-npx": { "command": "npx", "args": ["-y", "@some/mcp-server"] },
"via-uvx": { "command": "uvx", "args": ["some-mcp-server"] },
"via-binary": { "command": "/usr/local/bin/my-mcp-server", "args": [] },
"via-docker": { "command": "docker", "args": ["run", "--rm", "-i", "mcp/some-image"] }
}
}Docker note:
Always include -i in Docker args. Without -i, Docker closes stdin immediately and the MCP handshake fails.
2. HTTP - Connects to a remote MCP server over Streamable HTTP or SSE.
{
"mcpServers": {
"via-remote": {
"url": "https://mcp.example.com/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}Transport Fields
| Field | Description |
|---|---|
| command | Executable to spawn (stdio transport). Name on $PATH or absolute path. |
| args | Arguments passed to the command. |
| url | HTTP endpoint for the MCP server (HTTP transport). |
| headers | HTTP headers attached to every request (e.g. Authorization). |
If both
commandandurlare set, command takes precedence.
MCP Tool Behavior
- Tools are connected when the agent starts (
gatewayoragentcommand). - If a server fails to connect, picobot logs the error and continues — other tools remain unaffected.
- All connections are cleanly shut down when the gateway exits.
See CONFIG.md for the full configuration reference.
Full Changelog: v0.1.10...v0.2.0
Thanks to all contributors!