Skip to content

v0.1.2: MCP Support

Choose a tag to compare

@jin-bo jin-bo released this 24 Mar 05:05
· 770 commits to main since this release

What's New

🔌 MCP (Model Context Protocol) Support

Connect to external MCP tool servers to dynamically extend the agent's capabilities.

  • Stdio transport — spawn local MCP server subprocesses (e.g. npx @modelcontextprotocol/server-filesystem)
  • SSE transport — connect to remote HTTP/SSE endpoints
  • Auto-discovery — tools are discovered on startup and registered as mcp_{server}_{tool}
  • Confirmation — MCP tools require user confirmation unless the server is marked "trust": true
  • Env var expansion — $VAR and ${VAR} syntax in config values
  • Two-level config — project .chatagent/mcp.json overrides global ~/.chatagent/mcp.json
  • CLI commands — /mcp list, /mcp add, /mcp remove

Quick Start

Create .chatagent/mcp.json in your project:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
      "trust": true
    }
  }
}

Run uv run chatagent — MCP servers connect on startup, tools auto-register.

New Files

  • chatagent/mcp/config.py — Config loading + env var expansion
  • chatagent/mcp/client.py — McpClient + McpClientManager (async-sync bridge)
  • chatagent/mcp/tool.py — McpTool wrapper for Tool base class

Full Changelog: v0.1.1...v0.1.2