MCP (Model Context Protocol)
MCP (Model Context Protocol) lets Mona connect to external tool servers. This means you can give her access to databases, APIs, and services without writing Python code.
What is MCP?
MCP is an open protocol for connecting AI agents to external tools. Think of it like a USB-C port for AI capabilities — any service that speaks MCP can plug into Mona.
Quick start
Add an MCP server to your config:
# ~/.monoclaw/config.yaml
mcp_servers:
github:
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxx"
sqlite:
command: uvx
args: ["mcp-server-sqlite", "--db-path", "/path/to/data.db"]
fetch:
command: uvx
args: ["mcp-server-fetch"]
Restart Mona and the tools will appear in /tools.
Supported transports
| Transport | How it works | Best for |
|---|---|---|
stdio | Spawns a local process | Local tools, development |
http | Connects to a remote HTTP endpoint | Production services, shared tools |
Filtering tools
You don't have to expose every tool from an MCP server. Filter by name:
mcp_servers:
github:
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxx"
tool_filter:
include: ["search_repositories", "get_file_contents"]
# or exclude:
# exclude: ["create_issue", "create_pull_request"]
Utility tool policy
Some MCP servers expose "utility" tools (like echo or ping) that clutter the tool list. MonoClaw automatically hides low-utility tools unless you explicitly allow them:
mcp_servers:
my-server:
command: python
args: ["-m", "my_mcp_server"]
utility_tool_policy: allow # allow | hide | block
Finding MCP servers
Popular MCP servers:
| Server | What it does | Install |
|---|---|---|
@modelcontextprotocol/server-github | GitHub issues, PRs, repos | npx -y @modelcontextprotocol/server-github |
@modelcontextprotocol/server-postgres | PostgreSQL queries | npx -y @modelcontextprotocol/server-postgres |
@modelcontextprotocol/server-slack | Slack messages | npx -y @modelcontextprotocol/server-slack |
mcp-server-sqlite | SQLite queries | uvx mcp-server-sqlite |
mcp-server-fetch | Web fetching | uvx mcp-server-fetch |
Browse more at github.com/modelcontextprotocol/servers.
Security considerations
- MCP servers run with the same permissions as MonoClaw
- Use
tool_filterto limit what each server can do - Prefer
stdiofor local tools; usehttponly for trusted remote services - Review MCP server code before installing untrusted packages
Troubleshooting
| Problem | Fix |
|---|---|
| MCP tools don't appear | Check monoclaw doctor for MCP diagnostics |
| "Command not found" | Make sure npx, uvx, or the command is on PATH |
| Tool calls fail | Check the MCP server logs in ~/.monoclaw/logs/mcp/ |
| Too many tools | Use tool_filter.include to whitelist only what you need |