MCP Server
EchOS includes a built-in Model Context Protocol (MCP) server that exposes your personal knowledge base to any MCP-compatible AI client. Once connected, tools like Claude Code, Cursor, or Windsurf can search your notes, create new ones, and browse your knowledge base as a data source — without leaving the editor. The server runs as part of the EchOS daemon and listens on a configurable local port. It is disabled by default.Enabling the MCP server
Add these variables to your.env file:
127.0.0.1 — it is not reachable from other machines without an explicit tunnel or reverse proxy.
What it exposes
Tools
Resources
Resources let MCP clients browse your knowledge base as a structured data source, without needing to call a tool.
Clients that support resource browsing (e.g. Claude Code) can list all notes, tags, or categories via
resources/list, then read individual items via resources/read.
Connecting from Claude Code
Add the following to your Claude Code configuration. The file is~/.claude.json for a global setup, or .claude.json at the root of a project for a project-scoped connection.
Without authentication (localhost only, no MCP_API_KEY set):
MCP_API_KEY set in .env):
<your MCP_API_KEY> with the value you set in .env.
After saving the file, restart Claude Code (or run /mcp to reload). The echos server should appear as connected.
Connecting from Cursor
Create or edit.cursor/mcp.json in your home directory (global) or project root (project-scoped):
headers block if MCP_API_KEY is not set.
Connecting from other MCP clients
Any client that supports the Streamable HTTP transport can connect:- URL:
http://localhost:3939/mcp - Transport:
streamable-http(POST to/mcp) - Auth:
Authorization: Bearer <MCP_API_KEY>header (if key is set)
Authentication
Token comparison uses a timing-safe string equality check to prevent timing attacks.
Security considerations
- The server only binds to
127.0.0.1and is not reachable from other machines by default. - If you expose the port via a reverse proxy, SSH tunnel, or
ngrok, always setMCP_API_KEY. - The MCP server has the same read/write access as the EchOS agent — it can create and retrieve notes.
- See Security for the full EchOS security model.
Troubleshooting
Server not starting- Check that
ENABLE_MCP=trueis set in.envand the daemon has been restarted. - Check for port conflicts:
lsof -ti:3939
- Confirm the daemon is running:
pnpm startor check the systemd/launchd service status. - Verify the URL in your
.claude.jsonmatchesMCP_PORTin.env. - If using auth, double-check that the
Authorizationheader value matchesMCP_API_KEYexactly.
Unauthorized errors
- The
MCP_API_KEYin.envmust match the bearer token in your client config. - Regenerate the key with
openssl rand -hex 32, update both.envand the client config, then restart the daemon.