Context7
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Description from the maker (original English)
FastMCP server for TheBrain API — AI access to a personal knowledge graph, Tollbooth-monetized
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
You need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Works in Claude on the web, desktop and mobile:
https://personal-brain.fastmcp.app/mcpRun this in your terminal
claude mcp add --transport http personalbrain https://personal-brain.fastmcp.app/mcpPaste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"personalbrain": {
"url": "https://personal-brain.fastmcp.app/mcp"
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"personalbrain": {
"type": "http",
"url": "https://personal-brain.fastmcp.app/mcp"
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
ChatGPT connects only to servers on the internet:
https://personal-brain.fastmcp.app/mcpMenu names can differ slightly by plan and over time.
Your choice stays on this device in a cookie; no account needed.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
The server asks you to sign in before it lists its tools.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 8, 2026
The registry name was verified with the GitHub account lonniev, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
Responded in 353 ms (HTTP 401)
Declares OAuth sign-in, so your AI app can take you to log in
Not checked yet; we read the tool list when we check the endpoint
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs in the maker’s cloud. Connect over the internet with nothing to install, but what you send passes through the maker’s servers.
The GitHub repo last changed –, and the latest version (1.18.0) reached the registry 17 days ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. It connects by URL, so apps that accept remote MCP servers work too, such as ChatGPT in developer mode.
In the same category: Context7, Codebase Memory, Exa
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
The first city on the Lightning Turnpike.
An MCP server that gives AI agents read-write access to a personal knowledge graph — and pays for itself with Bitcoin Lightning micropayments.
*The metaphors in this project are drawn with admiration from* The Phantom Tollbooth *by Norton Juster, illustrated by Jules Feiffer (1961). Milo, Tock, the Tollbooth, Dictionopolis, and Digitopolis are creations of Mr. Juster's extraordinary imagination. We just built the payment infrastructure.*
Every turnpike needs its first city. Before the booths can collect fares and the authority can stamp purchase orders, someone has to build a destination worth driving to.
thebrain-mcp is that city — a FastMCP service deployed on Horizon that bridges AI agents to TheBrain, a personal knowledge graph of 9,000+ interconnected thoughts built over a decade. Every thought, link, attachment, and note operation maps directly to TheBrain's cloud API at api.bra.in.
It's also the proving ground for Tollbooth DPYC™ — the first MCP server where every tool call is metered via Bitcoin Lightning micropayments. Pre-fund, use, top up. No subscriptions, no API keys tied to billing accounts, no fiat payment processors. The novel contribution: an MCP server architecture where the operator monetizes AI agent access through Lightning micropayments without ever pestering the client mid-conversation.
Connect any MCP-compatible client (Claude Desktop, Cursor, your own agent) to the live endpoint:
https://personal-brain.fastmcp.app/mcp
No configuration needed. Your client connects with OAuth; the connection holds no npub until you prove one into it by answering a Nostr DM (request_npub_proof, then receive_npub_proof). A client that holds your nsec signs each request instead (NIP-98) and needs no DM. Tools then take only npub.
how_to_join() tool — this is the npub you registered as a DPYC™ Citizen, your identity for credit operations.request_credential_channel(sender_npub= , service= ) — opens a Secure Courier channel, sends a welcome DM to your Nostr client, and returns the channel's nonce.{"api_key": "...", "brain_id": "..."}receive_credentials(sender_npub= , service= , nonce= ) — vaults your credentials and activates the session.Returning users do not re-run this flow: the session restores from the vault on first use.
Credentials are delivered via encrypted Nostr DMs — they never appear in the chat window. On first-time relay receipt, the service sends an ncred1... credential card back to the patron via DM for scan-and-paste reuse.
Human in the loop: The patron must consciously approve each credential delivery via their Nostr client. Never auto-poll or auto-retry receive_* calls — each receive_credentials drains the relay destructively (NIP-09 deletion after pickup). Call it exactly once per credential delivery.
| Category | Pricing hint | Examples |
|---|---|---|
free | 0 sats | session_status, check_balance, check_price |
read | 1 sat | get_thought, search_thoughts, get_note |
write | 5 sats | create_thought, create_link, update_thought |
heavy | 10 sats | brain_query, get_modifications |
Actual prices are set dynamically by the operator's pricing model in Neon via api_sats per tool. Auth and balance tools are always free.
Credits are issued as tranches with a tranche_lifetime (TTL). Tranches are consumed FIFO; expired tranches are pruned automatically. Use check_balance to see your balance, active tranches, and usage history. Top up via purchase_credits with Bitcoin Lightning.
npub (Nostr public key), not an email or username. The nsec (private key) stays with the patron — never shared, never sent to a service.request_npub_proof → receive_npub_proof). Tools carry no proof argument.A Cypher-subset query language purpose-built for TheBrain. Agents and humans express graph operations in the same formalism — full CRUD via MATCH, CREATE, SET, MERGE, and DELETE.
MATCH (n {name: "Projects"})-[:CHILD]->(m) RETURN m
MATCH (n) WHERE n.name =~ "quarterly review" RETURN n MATCH (p {name: "Ideas"}) CREATE (p)-[:CHILD]->(n {name: "New Concept"}) MATCH (root {name: "Company"})-[:CHILD*1..3]->(d) WHERE d.name CONTAINS "Budget" RETURN d
Variable-length paths, multi-hop chains, compound WHERE with AND/OR/NOT/XOR, similarity search, and property existence checks. Full grammar in BRAINQUERY.md.
When a tool call fails, read the response — it tells you what happened and what to do next. Credential lifecycle states are not errors; they are expected situations with clear guidance.
| Situation | What to do |
|---|---|
| proof is required | Call request_npub_proof then receive_npub_proof — a fresh request/receive cycle. The proof lasts as long as the patron chose when approving it (up to 30 days). |
| Insufficient credit balance | Call purchase_credits to top up. |
| Cold start / session not ready | Retry in 10-15 seconds. |
| Credentials not found | Follow the Secure Courier onboarding flow (step 3 above). |
| Upstream API error | Only if the error explicitly mentions TheBrain API failure. Not a credential or billing issue. |
Don't Pester Your Customer: Do NOT ask the patron to re-authenticate or re-do the Courier flow unless the error message specifically says credentials are missing or expired.
For local installation and setup, see INSTALL.md and QUICKSTART.md.
To run your own instance, set these environment variables:
| Variable | Purpose |
|---|---|
TOLLBOOTH_NOSTR_OPERATOR_NSEC | Operator's Nostr secret key -- the single bootstrap key for identity, Secure Courier DMs, and audit signing |
This is the only env var the server reads. Certified operators bootstrap their Neon database URL from the Authority via encrypted Nostr DM -- NEON_DATABASE_URL is not read from the environment. The relay set comes from the shared dpyc-community registry, and tranche lifetime and constraints come from the operator's pricing model -- none of them is an env var.
All secrets flow through Secure Courier -- they never appear as environment variables:
| Credential | Delivery |
|---|---|
| TheBrain API key + brain ID | Patron delivers via encrypted Nostr DM |
BTCPay credentials (btcpay_host, btcpay_api_key, btcpay_store_id) | Operator delivers via Secure Courier |
Note:
THEBRAIN_API_KEYis not an environment variable. Patrons deliver their TheBrain API key and brain ID via Secure Courier (encrypted Nostr DM). Only the operator's nsec is configured as an env var.
The server exposes the standard Tollbooth DPYC™ operator surface via register_standard_tools() from tollbooth-dpyc, plus its domain tools. Tools fall into three paths in the DPYC three-actor topology (Operator / Authority / Oracle):
| Path | Tools | Status |
|---|---|---|
| Hot (local ledger) | check_balance, account_statement, account_statement_infographic, restore_credits, service_status | Implemented — delegates to server.py |
| Hot (Secure Courier) | session_status, request_credential_channel, receive_credentials, forget_credentials | Implemented — Nostr credential delivery with credential card DM |
| Identity | request_npub_proof, receive_npub_proof, check_proof_status, held_identities | Implemented — proves an npub into an OAuth connection |
| Delegation (Authority) | purchase_credits, check_payment | Implemented — auto-certifies via MCP-to-MCP |
| Delegation (Oracle) | oracle_lookup_member, oracle_how_to_join, oracle_get_tax_rate, oracle_about, oracle_network_advisory | Implemented — MCP-to-MCP via OracleClient |
Payment processing auto-certifies via the Authority (server-to-server OAuth). Secure Courier delivers encrypted credentials via Nostr DMs with automatic credential card (ncred1...) DM-back on first receipt. Oracle community tools route directly to the DPYC™ Oracle — free and unauthenticated.
The Tollbooth DPYC™ ecosystem is a three-party protocol spanning three repositories:
| Repo | Role |
|---|---|
| tollbooth-authority | The institution — tax collection, Schnorr signing, purchase order certification |
| tollbooth-dpyc | The booth — operator-side credit ledger, BTCPay client, tool gating |
| dpyc-oracle | The concierge — community onboarding, tax rates, membership lookup |
| thebrain-mcp (this repo) | The first city — reference MCP server powered by Tollbooth DPYC™ |
See the Three-Party Protocol diagram for the full architecture. The operator-side flow is also available.
thebrain-mcp/
├── src/thebrain_mcp/ # Server source, BQL engine, Tollbooth ├── tests/ # Test suite (465+ tests) ├── fastmcp.json # Horizon deploy entrypoint (src/thebrain_mcp/server.py) ├── pyproject.toml # Package metadata and dependencies ├── BRAINQUERY.md # BQL grammar and reference ├── INSTALL.md / QUICKSTART.md # Local install and setup ├── docs/diagrams/ # Architecture and protocol flow diagrams ├── LICENSE # Apache License 2.0 └── NOTICE # Attribution notice
The methods, algorithms, and implementations contained in this repository may represent original work by Lonnie VanZandt, first published on February 16, 2026. This public disclosure establishes prior art under U.S. patent law (35 U.S.C. 102).
All use, reproduction, or derivative work must comply with the Apa
Only the beginning is shown; read the rest in the repo