First release with Model Context Protocol (MCP) client support — connect gitagent to local and remote MCP servers and expose their tools to the agent.
✨ New
MCP client (#59)
- New
mcpServersoption onquery()(andmcp_serversinagent.yaml). - Transports: stdio (local child process) and http / sse (remote).
- Discovered tools are namespaced
<server>__<tool>and merged into the agent's tool set. - Clean, idempotent teardown of every server on all exit paths (success, hook-block, abort, error).
- Adds dependency
@modelcontextprotocol/sdk.
import { query } from "@open-gitagent/gitagent";
for await (const msg of query({
prompt: "List my open PRs",
mcpServers: {
github: { command: "mcp-github", args: ["--stdio"] },
api: { type: "http", url: "https://mcp.example.com" },
},
})) { /* … */ }🧪 Internal
- Added unit coverage for cost-tracker, compact, knowledge, and tool-utils (#71). Suite: 65 passing.
📦 Install
npm i @open-gitagent/gitagent@2.1.0Note: 2.0.1 is deprecated (a Windows hook-guard regression). Use 2.0.2+ / 2.1.0.