MCP Integration
Extend OpenAnalyst with unlimited tools via the Model Context Protocol (MCP).
What is MCP?
The Model Context Protocol (MCP) is an open standard for connecting AI models to external tools and data sources. OpenAnalyst CLI includes a full MCP client that can connect to any MCP-compliant server.
MCP tools appear alongside the 19 built-in tools and are invoked the same way by the agent.
Supported Transports
| Transport | Description | Use Case |
|---|---|---|
stdio | Standard input/output | Local processes, npm packages |
sse | Server-Sent Events over HTTP | Remote servers, cloud services |
websocket | WebSocket connection | Bidirectional real-time |
http | HTTP request/response | REST API wrappers |
sdk | Direct SDK integration | In-process tools |
managed-proxy | Managed proxy connection | Enterprise environments |
Configuring MCP Servers
Via Settings File
{
"mcp": {
"servers": {
"filesystem": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
},
"github": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_..."
}
},
"remote-api": {
"transport": "sse",
"url": "https://mcp.example.com/sse"
}
}
}
}
Via Slash Command
# List connected MCP servers
/mcp
# Add a new MCP server
/mcp add my-server stdio npx -y @my/mcp-server
# Remove a server
/mcp remove my-server
How It Works
Bootstrap
At startup, OpenAnalyst reads MCP server configs from settings and connects to each server. For stdio servers, it spawns the process. For network servers, it establishes the connection.
Tool Discovery
The MCP client sends a tools/list request via JSON-RPC. The server responds with its available tools, including names, descriptions, and parameter schemas.
Tool Registration
Discovered tools are registered alongside the 19 built-in tools. They appear in the agent's tool list and can be invoked like any other tool.
Invocation
When the agent calls an MCP tool, the request is routed through the MCP client to the appropriate server. Results are streamed back to the agent.
Popular MCP Servers
Filesystem
Read, write, and search files with controlled access to specific directories.
@modelcontextprotocol/server-filesystem
GitHub
Create issues, PRs, search repos, manage branches via GitHub API.
@modelcontextprotocol/server-github
PostgreSQL
Query databases, inspect schemas, run migrations.
@modelcontextprotocol/server-postgres
Slack
Read channels, post messages, search conversations.
@modelcontextprotocol/server-slack
MCP Resources
In addition to tools, MCP servers can expose resources — contextual data that the agent can read. Resources might include database schemas, API documentation, or project metadata.