cortex
Allows agents to write and manage markdown notes in a format compatible with Obsidian, enabling the same vault to be opened in Obsidian for visualization, editing, and graph exploration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cortexsearch for backpropagation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ cortex
A local, Obsidian-compatible second brain for agents.
An agent that re-derives the same facts every session is spending tokens to stay ignorant. cortex gives it a durable, wikilinked knowledge base on disk: it distils what it learns into small interconnected markdown notes, then recalls just enough of them later. Notes link to each other with [[wikilinks]], so the brain becomes a graph you can traverse β backlinks, related notes, hubs, orphans β not a flat pile of memories.
Every note is a plain markdown file in a folder, so you can open the exact same vault in Obsidian and watch the graph grow. Based on Andrej Karpathy's LLM Wiki pattern: compile knowledge once into an interconnected wiki instead of asking the model the same questions over and over.
Part of tools-for-agents. Zero dependencies β Node standard library + built-in node:sqlite with FTS5. The markdown files are the source of truth; the SQLite index is derived and rebuildable at any time.
Why
Without cortex | With cortex |
Re-explain the same architecture every session |
|
Memories are a flat list β no structure | Notes link with |
"What did I decide about X, and what's related?" |
|
Memory locked inside one tool | A folder of markdown you (and Obsidian) fully own and can edit |
Knowledge grows unmanaged |
|
Related MCP server: Obsidian MCP Server
The vault
cortex keeps notes in $CORTEX_VAULT (default ./vault), organised by type β the Karpathy LLM-Wiki layout:
vault/
βββ concepts/ # ideas, frameworks, theories
βββ entities/ # people, orgs, products, tools
βββ sources/ # captured raw material + summaries
βββ synthesis/ # comparisons, analyses, themes
βββ daily/ # timestamped journal, one file per day
βββ notes/ # anything else
βββ .cortex/ # the derived SQLite index (safe to delete & rebuild)A note is just markdown with YAML frontmatter:
---
title: Backpropagation
type: concept
tags: [deeplearning]
---
The algorithm that trains [[Neural Networks]] by propagating error via the
chain rule. Uses [[Gradient Descent]]. #optimizationWrite [[Other Note]] to link and #tags to categorise. Links to notes that don't exist yet are broken links β cortex tracks them as suggestions, and they heal automatically the moment you write that note.
CLI
cortex write "Neural Networks" --type concept --tags ml,ai \
--body "Function approximator. Trained by [[Backpropagation]]. #deeplearning"
cortex write "Neural Networks" --append --body "Modern variants: [[Transformers]]."
cortex capture "raw article textβ¦" --source https://example.com # inbox for later
cortex search "train network error" -k 6 --tag deeplearning # ranked snippets
cortex read "Neural Networks" # full note
cortex links "Neural Networks" --in # backlinks
cortex related "Backpropagation" # graph neighbourhood
cortex suggest "Backpropagation" # notes to link that aren't linked yet
cortex lint # health report: orphans/broken/untagged/stubs
cortex tags | cortex tags deeplearning # tags β notes
cortex graph # hubs, orphans, broken links
cortex daily "shipped the retriever" # journal
cortex sync # re-index after Obsidian edits
cortex serve --port 7800 # live graph web view
cortex statsVault location: $CORTEX_VAULT (default ./vault).
Web view

cortex serve starts a zero-dependency web app at http://localhost:7800 β a premium, Obsidian-style knowledge graph of your vault rendered on canvas: glowing nodes (sized by connections, coloured by type) joined by [[wikilink]] synapses.
Hover any note to trace its neighbourhood β connected notes light up with energy flowing along the links, everything else dims β and a tooltip previews the note at a glance: its type, connection count, a β hub marker for the most-linked notes, and its
#tags, so you can read what a note is about without opening it.Click a note to read it in a side panel (fetched live): its body with clickable
[[wikilinks]], its tags, and its links to / linked from lists β navigate note-to-note with a back button.Related notes β the panel also surfaces notes that share a tag but aren't linked yet (ranked by shared-tag count), each showing the tag they have in common β the latent connections worth writing, so your second brain keeps knitting itself together.
Search from the top bar (ranked dropdown, keyboard-navigable), filter by type from the legend, click the stat for a graph overview β hubs, type breakdown, and the gaps worth closing: orphans (notes with no links, ready to connect) and unwritten notes (broken-link targets to write). Click an orphan to open it, or an unwritten one to fly to what references it.
Drag to rearrange, scroll/pinch to zoom, recenter, and a light/dark theme toggle.
Path finder β hit the β€³ path control, then click two notes: cortex traces the shortest chain of
[[wikilinks]]connecting them (breadth-first over the link graph), lighting the route in a pulse from start to end and dimming everything else, with a readout of the hops (Backpropagation β Neural Networks β Transformers Β· 2 hops). The answer to "how are these two ideas related?" β or "are they connected at all?" β at a glance.Focus mode β open a note and hit β focus neighbourhood to isolate its corner of the brain: everything within a 1 / 2 / 3-hop radius stays lit, everything else fades. Dial the radius live and see how far the idea reaches (
recall Β· 2 hops Β· 11 notes) β a clean read of one note's context without the whole graph competing for attention.Write a note from the graph β hit οΌ (or
n) to author a note straight into the vault: title, type, tags, markdown body with[[wikilinks]]. And the graph's ghosts stop being dead ends: it has always shown you unwritten notes β a dashed node where a[[wikilink]]points at nothing β and then refused to help. Now clicking a ghost opens the composer with its title already in place (βSomething already links to Raft β writing it heals that link into the graphβ). Write it, and the broken link becomes a real edge. Writing is aPOST(aGETreads a note; only a request that means to can rewrite the vault).The journal β hit β (or
j) and write a line into today: what happened. It appends a timestamped bullet to today's note, and the panel reads the days back β the last leg of cortex's own loop (recall β capture β distil β connect β journal) was the one thing the brain could write and never show. Today becomes a real node in the graph like any other note, so the day you did the work is linked to the work.Vault health β a second brain that can't tell you it's decaying will decay quietly.
linthas always known the vault's condition β what's orphaned, what points at nothing, what's untagged, what's a stub, and what has gone quiet β and nothing ever showed it: the graph draws broken links as ghosts but never counted them. Now a health chip (13 to tend/vault is healthy) opens the whole report, and every issue is one click from being fixed: a broken link opens the composer with the missing note's title already in place β write it and the link heals itself. Note that fixing one thing can raise the count, honestly: heal a link by writing a two-line note, and it shows up as untagged and barely written. It is not flattering you.The inbox β four tools now capture into cortex (
recall,lens,anvil,scout), and every capture lands untagged and unlinked β a graph quietly accumulating dead ends. The π₯ inbox (with a count badge) is the maintenance loop, made one-click: it lists every note nothing links to, says why it's stranded (orphanΒ·untaggedΒ·stub), and proposes what it belongs with β the notes it already resembles (FTS-similar but unlinked) and the tags those notes carry. Pick, hit weave in, and cortex writes the tags into the note's frontmatter and aRelated: [[β¦]]line into its body β real edits to the file, so the links heal into the graph like any other. Agents get the same loop viacortex_triage+cortex_weave.Recency heat β hit the β last updated control and the graph re-shades by time: notes you touched today burn amber, the ones cooling off fade toward slate, and the parts of your brain you have not thought about in a year go cold. The scale is logarithmic in age (a day vs a week matters as much as a month vs half a year), relative to your own vault's span β so the dormant corners are obvious whether you write daily or once a season. Every tooltip also shows updated 3h ago.
Capture from anywhere β
POST /api/captureis the one write the web view exposes (aGETcan never create a note), and it is what lets the rest of the toolkit write into your brain: hit π§ β cortex on anyrecallresult β something the team knew, a page you read, a line of code β and it lands here as a note, carrying a link back to where it came from. The graph is watching the vault, so it blooms in live.Minimap β a small overview of the whole brain sits in the top-left, with a rectangle marking the part you're looking at; click or drag on it to fly across a large graph without losing your place.
Keyboard-accessible β every control has a visible focus ring, and the legend type-filters, note-panel links and related notes are all reachable with Tab + Enter (not just the mouse), with aria-labels throughout.
Live β the server watches the vault and pushes updates over SSE, so the graph grows in real time as your agent (or you, in Obsidian) writes notes. It's the same brain your agent writes to β watch it grow.
Want a graph to look at right away? Seed a starter vault (interlinked notes about the toolkit itself):
CORTEX_VAULT=./vault node scripts/seed.js # 12 connected notes, 0 orphans
node src/cli.js serveMCP server (for agents)
{
"mcpServers": {
"cortex": { "command": "node", "args": ["/abs/path/to/cortex/mcp/mcp-server.js"],
"env": { "CORTEX_VAULT": "/abs/path/to/your/vault" } }
}
}Tools
Tool | Use it to⦠|
| Create/update a note β link with |
| Stash raw material (article, transcript, finding) into the source inbox to distil later. |
| Recall what you already know as ranked, token-budgeted snippets β instead of re-deriving it. |
| Read a full note by title / slug / alias. |
| A note's backlinks (in), forward links (out, broken ones flagged), or both. |
| Notes related by direct links, co-citation and shared tags. |
| Notes this one should link to but doesn't yet β weave orphans into the graph. |
| Vault health: orphans, broken links (a to-do list of notes to write), untagged notes, stubs. |
| All tags with counts, or the notes for one tag. |
| Graph health: hub notes, orphans, and broken links worth writing. |
| Most recently updated notes. |
| Append a timestamped line to today's journal β a trail across sessions. |
| Re-index the vault after files change on disk (e.g. edited in Obsidian). |
| Note / link / tag counts, broken links, types. |
A good loop for an agent
Recall first β
cortex_searchbefore solving; you may have already worked this out.Capture raw findings with
cortex_captureas you go.Distil into small
cortex_writenotes, each linking to related concepts with[[β¦]].Connect β check
cortex_graphfor orphans and broken links, and write the missing notes.Journal the session with
cortex_dailyso the next run has a trail.
How it works
Files are truth. Each note is a markdown file with YAML frontmatter; the SQLite index is derived from them and rebuilt by
sync(incremental by mtime). Delete.cortex/any time β it regenerates.Search is FTS5 (
porter unicode61) ranked by bm25, filling snippets up to a token budget (β4 chars/token) β the same discipline aslens, pointed at your brain instead of a codebase.The graph is a link table. Every
[[target]]is resolved to a note by slug, title or alias; unresolved targets are kept as broken links and heal automatically when the target note appears.Slugs are unicode-aware (Turkish and accented titles transliterate to clean ascii filenames).
Obsidian-compatible end to end: open
$CORTEX_VAULTas a vault and the wikilinks, tags and graph view all just work.
The agent toolkit
cortex is the remember leg of tools-for-agents β an operating system for agents.
Seven zero-dependency, MCP-native tools that form one loop:
π°οΈ | coordinate β shared memory, a kanban agents claim work from, a registry, a cost ledger | |
π | read code β token-budgeted retrieval β search, outlines, surgical reads | |
β | run safely β a throwaway Docker sandbox: network off, capped, timed | |
π§ | cortex | remember β an Obsidian-compatible second brain, wikilinked |
π§ | read the web β a URL becomes clean, cached, searchable markdown | |
π― | recall it all β one query across brain, team, reading and code | |
π | see β look at what you built, before you claim it works |
Reading this as an agent? /llms.txt is the map, and
/tools.json hands you all 70 MCP tools β every name, every
description, every install command β in one fetch, without cloning anything.
MIT licensed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tools-for-agents/cortex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server