Remote Access (HTTP)
Expose the OpenContext MCP server over the network.
Start the Server
By default OpenContext runs over stdio. Pass --http to serve the MCP endpoint over HTTP. The endpoint URL is printed to stderr on startup:
terminal
opencontext-mcp --http
[opencontext] v1.2.1 active. http://127.0.0.1:3032/mcpOptions
| Flag | Description |
|---|---|
| --http | Serve over HTTP using the Streamable HTTP transport |
| --port <port> | HTTP port (default: 3032) |
| --host <host> | Interface to bind (default: 127.0.0.1) |
Custom port
opencontext-mcp server --http --port 8787
Bind to all interfaces
opencontext-mcp server --http --host 0.0.0.0
Endpoint & Behavior
The server listens at http://<host>:<port>/mcp using the stateless Streamable HTTP transport — each request is handled in isolation, no sessions are tracked in memory.
POST /mcp— send JSON-RPC messages (initialize, tools/list, tools/call).GET /— returns basic server info, handy for a browser health check.
Connect an MCP Client
Point any MCP client that supports the Streamable HTTP transport at the printed URL. OpenCode:
opencode.json
{
"mcp": {
"opencontext": {
"type": "http",
"url": "http://127.0.0.1:3032/mcp",
"enabled": true
}
}
}Claude Desktop / Cursor:
claude_desktop_config.json
{
"mcpServers": {
"opencontext": {
"type": "http",
"url": "http://127.0.0.1:3032/mcp"
}
}
}Run the server with --host 0.0.0.0 to make it reachable from other machines on your network.