@ubgrade/cortex-mcp
v0.1.1
Published
Cortex Brain MCP — dynamic tool bridge for Claude Code and Cursor
Readme
@ubgrade/cortex-mcp
Dynamic MCP bridge for Cortex Brain — gives Claude Code, Cursor, and any MCP-compatible client persistent memory across sessions.
No hardcoded tools. The platform controls what tools are available based on your API key tier and permissions.
Install
Claude Code
claude mcp add cortex -- npx @ubgrade/cortex-mcpSet your API key:
export CORTEX_API_KEY=cortex_key_...Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"cortex": {
"command": "npx",
"args": ["@ubgrade/cortex-mcp"],
"env": {
"CORTEX_API_KEY": "cortex_key_..."
}
}
}
}Any MCP client
CORTEX_API_KEY=cortex_key_... npx @ubgrade/cortex-mcpConfiguration
| Environment Variable | Required | Default | Description |
|---------------------|----------|---------|-------------|
| CORTEX_API_KEY | Yes | — | Your API key from crewbase.cloud |
| CORTEX_API_URL | No | https://api.ai-cortex.io | Platform API URL (use https://api.ai-cortex.eu for EU) |
How it works
- Authenticates with your API key
- Fetches available tools from the platform (
GET /api/tools) - Registers each tool with the MCP SDK
- Proxies tool calls back to the platform
- Polls for tool updates every 60 seconds
Tools are loaded dynamically — when the platform adds new tools or changes your tier, they appear automatically.
Offline mode
After the first successful connection, tools are cached locally at ~/.cortex-mcp/tools-cache.json. If the platform is temporarily unreachable, the MCP server starts with cached tools.
ChatGPT Custom GPT
Generate an OpenAPI spec for ChatGPT Custom GPT actions:
CORTEX_API_KEY=cortex_key_... npx @ubgrade/cortex-mcp --openapi > openapi.jsonPaste the generated spec into your Custom GPT's actions configuration.
CLI
npx @ubgrade/cortex-mcp # Start MCP server (stdio)
npx @ubgrade/cortex-mcp --openapi # Generate OpenAPI spec to stdout
npx @ubgrade/cortex-mcp --version # Print versionLicense
MIT
