Plug CortexPlus into any AI
Everything you store becomes one tool call: send a question, get back the passages that answer it plus their graph neighbours, already formatted as text a model can read.
1. Get an API key
Create a key in API keys, or from the API with apikey:create. The plaintext key
is shown once — store it in your environment, never in client-side code. A key is scoped to
your workspace and can be revoked at any time.
The Free plan includes one key, Personal five, Pro and Business as many as you need.
2. Connect over MCP
MCP is how assistants discover tools on their own. Point your client at https://mcp.cortexplus.io, hand it your API key once, and
Claude, ChatGPT, Gemini or any other MCP client can read your memory — and write to it —
without you pasting anything.
The endpoint speaks Streamable HTTP and authenticates with your CortexPlus key as a bearer token. One key means one workspace: the server only ever sees the key your client sends, so two people using the same assistant never see each other's memory. The model never receives the key — your client holds it.
There are two ways to authenticate. Paste an API key in the client's config, as the examples
below do, or, in clients that only offer a Connect button, sign in — this endpoint
is also an OAuth 2.1 server, and signing in creates a dedicated API key for that client which
you can see and revoke on the API keys screen. What the client can do is what you allowed when connecting: saving notes
(remember) is a separate permission you can leave off for
a read-only connection.
| Tool | What it does |
|---|---|
| search | Ranked matches for a question, each with an id, a title and a link back to the app. |
| fetch | The full content of one item, by the id search returned. |
| recall | The fused context block — the passages that answer a question plus their graph neighbours, as text. This is the one to use when answering from memory. |
| remember | Stores a note in your workspace. Clients ask before running it, since it writes. |
search and fetch follow
the schema OpenAI's connectors expect, so the same endpoint works as a ChatGPT connector
and as a plain MCP server everywhere else.
https://mcp.cortexplus.io
Authorization: Bearer cortex_... 3. Claude, ChatGPT and Gemini
Three setups, one endpoint. Everywhere below, replace cortex_... with a key from API keys — keep it
in the client's config file, never in a prompt.
Claude
Claude Code adds a remote server in one command:
claude mcp add --transport http cortexplus https://mcp.cortexplus.io \
--header "Authorization: Bearer cortex_..." Remote connectors in Claude Desktop and on the web can sign in at the same URL. Clients driven by a config file — Cursor, VS Code, Zed — take the same server as JSON:
{
"mcpServers": {
"cortexplus": {
"type": "http",
"url": "https://mcp.cortexplus.io",
"headers": { "Authorization": "Bearer cortex_..." }
}
}
} Then just ask: "recall what we decided about pricing". Claude calls recall, gets the block of stored passages and answers from
it. Ask it to "remember" something and it stores a note back.
ChatGPT and Codex
Through the API, CortexPlus is a remote MCP tool on any Responses call — your key goes in authorization:
{
"model": "gpt-5",
"tools": [{
"type": "mcp",
"server_label": "cortexplus",
"server_url": "https://mcp.cortexplus.io",
"authorization": "cortex_...",
"require_approval": "never"
}],
"input": "What did we decide about pricing?"
} In the ChatGPT app, turn on Developer mode under Settings → Security and login, open Plugins, and add CortexPlus as a connector pointing at https://mcp.cortexplus.io. Sign in when it asks — no key to
paste. Deep research and company knowledge use the search and fetch pair.
Gemini CLI
Add the server to ~/.gemini/settings.json (or a project's .gemini/settings.json):
{
"mcpServers": {
"cortexplus": {
"httpUrl": "https://mcp.cortexplus.io",
"headers": { "Authorization": "Bearer cortex_..." },
"timeout": 30000
}
}
} Restart the CLI and run /mcp to confirm the four tools are
listed. From there, ask Gemini to recall or remember in plain language.
A key is scoped to your workspace and revocable at any time from API keys. Revoking it disconnects every client that used it.
4. How the API works
CortexPlus is not REST. Calls are logical actions — plugin:action — carried over Gluer, either through the HTTP relay or a WebSocket client. The credential
travels inside the data payload, never in a header.
curl -sS https://api.gluer.io/api \
-H 'content-type: application/json' \
-d '{
"smh": ">:my-session:cortexplus:context:build",
"uuid": "0f4d7e2e-6c45-4e25-a1e2-0d4e2e1f9f26",
"data": {
"apiKey": "cortex_...",
"query": "what did we decide about pricing?",
"limit": 10
}
}' import GluerJS from 'gluer-js';
const client = new GluerJS({
url: 'wss://ws.gluer.io',
httpUrl: 'https://api.gluer.io',
project: 'cortexplus',
sessionId: 'my-session',
httpFallback: true
});
client.connect();
const response = await client.sendMsgSync('context:build', {
apiKey: process.env.CORTEX_API_KEY,
query: 'what did we decide about pricing?',
limit: 10,
depth: 1,
maxChars: 4000
});
console.log(response.data.text); The logical command is >:<sessionId>:<project>:<plugin>:<action>. Responses come back as { data } on success and { error } on failure.
project is the project key CortexPlus is published under —
the same value the web app uses.
5. Write context
Anything you send is chunked, embedded and linked. Notes and messages go through node:create; files are uploaded with attachment:presignUpload and then ingested with attachment:ingest; a migration from another system fits in import:bulk.
await client.sendMsgSync('node:create', {
apiKey: process.env.CORTEX_API_KEY,
type: 'meeting-note',
title: 'Pricing review',
content: 'We index pages, not gigabytes…',
tags: ['pricing', 'product']
}); 6. Read context
node:search is literal text search, node:similar is vector similarity, and context:build fuses both and expands along the graph. For
an AI integration, use context:build: it returns a ready
text block bounded by maxChars.
// Vector similarity — closest passages to a phrase
await client.sendMsgSync('node:similar', {
apiKey, text: 'how we price indexed content', limit: 5
});
// Fused text + vector search, expanded through the graph
await client.sendMsgSync('context:build', {
apiKey, query: 'how we price indexed content', depth: 1, maxChars: 8000
}); 7. Or call it as your own tool
If your app drives the model itself, skip MCP and expose one function: let the model decide when to recall. This works the same with any provider that supports tools or function calling — the model never sees your key, only the text that comes back.
const tools = [{
type: 'function',
function: {
name: 'search_my_memory',
description: "Search the user's CortexPlus memory and return relevant context.",
parameters: {
type: 'object',
properties: { query: { type: 'string' } },
required: ['query']
}
}
}];
async function searchMyMemory({ query }) {
const response = await client.sendMsgSync('context:build', {
apiKey: process.env.CORTEX_API_KEY,
query,
limit: 10,
maxChars: 6000
});
return response.data.text; // paste straight into the model's context
} 8. Errors and quotas
Failures come back as { "error": "message" }. Hitting
a plan limit is a typed error carrying the resource, what you used and the limit, so your
integration can tell the difference between a bug and a full plan.
{ "error": "quota_exceeded", "data": { "resource": "indexedChunks", "used": 150000, "limit": 150000 } } Reads keep working when a limit is reached — only new indexing pauses. Raise the limit from Billing, or see what each plan includes on the pricing page.