Skip to main content
Claude Code is Anthropic’s command-line agent. Connecting it to Cortex means it can search your knowledge and file new findings as it works, so what one coding session learns is there for the next.

What you need

  • A Cortex account.
  • Claude Code installed and working in a project.
1

Get the connection config

In Cortex, open any brain’s Connect page and choose the Claude Code tab. It shows a small block of JSON with your workspace’s URL already filled in:
Copy it.
2

Add it to your project

Paste the block into a .mcp.json file in the root of your project (merge it in if the file already exists). Claude Code reads this file and offers the connection the next time it starts in that project.Prefer a one-liner? From the project directory you can instead run claude mcp add --transport http cortex https://api.oncortex.ai/t/your-workspace-id/mcp, which writes the same entry for you.
3

Approve the connection

The first time Claude Code uses the connection, it opens your browser to approve. The Cortex approval screen names the workspace and shows that the agent will act as you. Confirm, and Claude Code is connected to every brain you can access.
4

Use it

Ask Claude Code to draw on your brains:
  • “Search Cortex for how we handle authentication.”
  • “File a summary of what we changed today in the project brain.”
  • “What decisions have we recorded about this project?”

Giving it files

Hand Claude Code a document and ask it to file it: it uploads the file to the brain’s inbox first, gets the extracted text back from Cortex, writes the pages and archives the item, all with its own tokens. The file’s bytes never pass through the conversation. With the command line installed, the upload streams from disk; without it, Claude Code uses a one-time upload address from its shell. Ask your agent has the steps.

A memory that keeps itself

The most useful pattern is to have Claude Code record its own work as it goes, so your brain fills up without you copying anything by hand. See capturing agent conversations for how to set that up with a project hook.

An assistant that knows your tasks

Once meetings and mail flow in, Claude Code can answer “what have I committed to this week?”, move what you agree with onto your list, and push tasks to the tool you actually work from. See tasks.

Managing the connection

The connection shows up under Connected Agents on the Connect page, and can be revoked there at any time. One connection covers all your brains in the workspace; only a second workspace would need a second entry in .mcp.json.