Reference
MCP
Connect MCP servers so the agent can use their tools, and serve 8gent's own tools to other MCP clients.
Use MCP servers
List servers in ~/.8gent/mcp.json. A server is either a command 8gent starts (stdio) or a URL (SSE):
{
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/notes"]
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"remote": {
"url": "https://mcp.example.com/sse",
"headers": { "Authorization": "Bearer <token>" }
}
}
}The older mcpServers key is read too. Each entry needs command or url. Put secrets in env for a command server, or in headers for a URL server; the file stays on your machine.
The agent reaches them through two tools, loaded when it needs them:
| Tool | What it does |
|---|---|
mcp_list_tools | List the tools your servers offer |
mcp_call_tool | Call one |
Ask for it in plain words: "list the MCP tools you have", "use the filesystem server to find notes about the release".
Serve 8gent's tools over MCP
8gent mcp-server # all tools, over stdio
8gent mcp-server --tools=safe # read-only tools onlyPoint any MCP client that speaks stdio at that command. With --tools=safe, only tools that do not change anything are offered.