v1.3.8

MCP Client

Last updated


Agenvoy's MCP client lets agents call tools exposed by any MCP server. Client and server share one package (internal/runtime/mcp) built on the official modelcontextprotocol/go-sdk.

Configuration layout


One file. The session-scoped layer was removed — every client reads the same config:
  1. ~/.config/agenvoy/mcp.json

JSON format


  1. {
  2. "servers": {
  3. "github": {
  4. "command": "npx",
  5. "args": ["-y", "@modelcontextprotocol/server-github"],
  6. "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
  7. },
  8. "remote-api": {
  9. "url": "https://api.example.com/mcp",
  10. "headers": { "Authorization": "Bearer ${TOKEN}" }
  11. }
  12. }
  13. }

command and url are mutually exclusive. ${VAR} / $VAR placeholders inside env, headers, and args are expanded with os.ExpandEnv at startup.

Transport types


TypeConfig keysSDK transportUse case
stdiocommand + args + envCommandTransportLocal CLIs (npx, native binaries)
Streamable HTTPurl + headersStreamableClientTransportRemote services, long-running MCP servers

Both transports are handled by the SDK; Agenvoy only supplies the command or the endpoint plus a header-injecting HTTP client.

Management


TaskTUIHTTP
List servers/mcpGET /v1/mcp
Add a server/mcpPOST /v1/mcp
Remove a server/mcp → d on the serverPOST /v1/mcp/remove
Connection status/mcpGET /v1/mcp/status
Reconnect and re-register tools/mcp → server → reconnect (that server only)POST /v1/mcp/reconnect (all servers)
List registered MCP tools/mcp → server → toolsGET /v1/mcp/tools
Per-tool auto-approve/mcp → server → toolsPOST /v1/allowlist with a tool block
Browser OAuth login/mcp → server → login / reloginGET /v1/mcp/oauth?name=X (SSE)
Pre-registered OAuth client/mcp → server → clientPOST /v1/mcp/oauth/client
Clear an OAuth login—DELETE /v1/mcp/oauth

The add flow asks for the server name, transport (Local stdio / Remote HTTP), and the type-specific fields. There are no agen mcp CLI subcommands. Since v1.2.0 the TUI opens no MCP connections of its own: /mcp status, reconnect, tools and remove (disconnect) are sent to the daemon over its Unix socket (~/.config/agenvoy/daemon.sock), which owns every MCP client.

OAuth for HTTP servers


A server marked auth: oauth logs in through mcp.Login: the daemon opens a loopback callback listener on localhost:17988, performs dynamic client registration when the provider allows it, and stores the resulting token and client id in the OS keychain. When the provider rejects dynamic registration, supply a pre-registered client with POST /v1/mcp/oauth/client (redirect_uri defaults to http://localhost:17988/callback and must match the provider console exactly). When the browser cannot reach the listener, paste the redirect URL back with POST /v1/mcp/oauth/callback.

Zero-auth, locally executed (no API key required):
ServerPurpose
mcp-server-sqliteRun SQL on local .db files
@modelcontextprotocol/server-memoryPersistent knowledge graph
@playwright/mcpBrowser automation (downloads chromium)
@modelcontextprotocol/server-postgresLocal Postgres connection
mcp-server-timeTimezone conversion / relative time

Avoid registering MCP servers whose capabilities overlap with built-in tools (e.g., filesystem, git, fetch, shell) — duplicates only inflate the LLM tool list.
中文