mcp.json once and the tools are exposed to the LLM in exactly the same way as built-in tools — automatically selected and invoked.
Configuration File
CowAgent reads~/cow/mcp.json. If the file does not exist, no MCP tools are loaded — and no error is raised.
For Docker deployments, the official docker-compose.yml already mounts the host’s ./cow directory to /home/agent/cow inside the container (i.e. the container user’s ~/cow). Just drop mcp.json into the host’s ./cow/ directory and it will take effect.
Standard Format
Fully compatible with the MCP community standard, identical to Claude Desktop / Cursor:Full Example
- fetch: Generic web page fetcher that returns page text content. No API key required.
- github: Access GitHub repos, issues, PRs, etc. Requires a Personal Access Token.
Let the Agent Configure It for You
CowAgent ships withread / write / edit tools, so you can simply send the MCP config to the Agent and ask it to write the file:
For example:
- Read the existing MCP config and merge the new server entry, preserving existing ones
- Hot-reload the new MCP server, so the corresponding tools become available on the next message
Web Authorization (OAuth)
Some remote MCP servers require OAuth web authorization, and connecting to them directly returns401. CowAgent has a built-in standard OAuth flow, so no manual token is needed — just configure the server normally, for example:
401 on its first load, authorization starts automatically: running locally opens the browser automatically, while server deployments print the authorization link to the log for you to open in a browser. Once you approve, the server comes online immediately; tokens are refreshed automatically on expiry, so you never have to re-authorize.
- Requires the web service: The authorization callback is received by the web console (default port
9899), so the Web channel must be running. - Credential storage: Tokens are persisted in
~/.cow/mcp_oauth.jsonand reused across restarts. - Callback URL: Defaults to
http://127.0.0.1:9899/mcp/oauth/callback. If deployed on a server with the authorizing browser on another device, setmcp_oauth_redirect_baseinconfig.json(e.g.http://YOUR_IP:9899).
How It Works
- Async loading at startup: All servers configured in
mcp.jsonare loaded asynchronously in the background, never blocking the main loop — chat is usable immediately. - Hot reload: When you or the Agent modifies
mcp.json, changed servers are automatically reloaded after the current message — no need to restart cow. - Flat exposure: Each method exposed by an MCP server appears as an individual tool. The LLM picks one directly without a second-stage decision.
Supported Transports
Troubleshooting
Recommended MCP Marketplaces
You can browse third-party MCP marketplaces and copy a JSON config to use directly, for example:- mcp.so — Global MCP service index
- ModelScope MCP Hub — ModelScope’s MCP hub, more reliable from mainland China
