MCP ACCESS BRAINKB FROM ANY MCP CLIENT

Interact with
BrainKB through
your AI agent.

BrainKB MCP connects your AI agent to the BrainKB knowledge base through the Model Context Protocol. Ask in plain language, and your agent signs in as you, ingests RDF into your workspaces, answers questions over extracted entities, and traces where every triple came from.

Access open knowledge without login · Per-caller identity · Provenance on every change
✳
Your agentREASON & PLAN
▤
WorkspacesINGEST & SHARE
BrainKBOne connection.
≋
Knowledge graphQUERY & DISCOVER
↻
ProvenanceTRACE & AUDIT
ONLINE

WHAT YOU CAN REACH IN BRAINKB

▤ Workspaces ≋ RDF graphs ◈ Named entities ↻ PROV-O provenance
Through MCP

Less SPARQL.
More science.

Ask in plain language and your agent picks the right BrainKB tools. Every action runs as you, within your permissions.

↓

Ingest

Load RDF from text, files or large streamed uploads. Every ingest runs as a background job, attributed to you.

› Ingest review.ttl into my lab space
› Did last night's ingest finish?
⌕

Search and read

Search everything you may read, open a whole space, or list the graphs in the knowledge base.

› Find anything about Purkinje cells
› What's in the hmba space?
◈

Ready-made questions113 questions

Vetted questions about extracted entities, cells, markers, phenotypes, causal claims and research resources, answered from the graph without writing a query.

› How is the neocortex written across papers?
› Which entities do these papers share?
↻

Provenance

See the history of any graph: who added what, when, and the exact triples each ingest contributed.

› What changed in my space this week?
› Who added these triples?
▤

Workspaces

Create private or public spaces, for yourself or a team, and choose who can read or edit them.

› Create a private space for my lab
› Give alice@lab.org edit access
⚿

Identity and access

Sign in with Globus, ORCID or GitHub, keep a personal access token, and let admins manage roles and permissions.

› Log me in with Globus
› Make me a token for this laptop
Open knowledge · no login

Access open knowledge.
No need to log in.

Public spaces in BrainKB are open knowledge for everyone. Connect any MCP client without logging in and your agent can browse, search and read them. It is read-only: nothing can be added or changed without an account.

No login READ-ONLY

Anyone, from any MCP client, with no token or account.

  • ✓List public spaces brainkb_list_spaces
  • ✓Search across public spaces brainkb_search
  • ✓Read a public space's RDF brainkb_read_space
  • ✕Private spaces never appear and can't be read
  • ✕No ingest, edits, sharing, provenance, SPARQL or admin

Logged in YOUR ACCOUNT

Everything on the left, plus what your role and memberships allow.

  • ✓Your own and shared private spaces
  • ✓Create spaces, ingest RDF, share and publish
  • ✓Provenance and triple-level change history
  • ✓Ready-made questions and SPARQL (by role)
  • ✓Admin tools, if you are authorized
What "public" meansA space owner chose to publish it. Owners can switch a space between public and private at any time; private data is never returned to anyone who isn't a member.
How to connect without loginAdd https://mcp.brainkb.org/mcp to your client and skip login. Then just ask: "What public spaces are in BrainKB?"
When you'll be asked to log inOnly when a request needs an account, such as a private space or any change. Your agent says so, then starts the BrainKB login.
Connect

Connect from
any MCP client.

Point your client at https://mcp.brainkb.org/mcp (streamable HTTP). Every call that needs an account runs as you: the client signs in with your own BrainKB account, never a shared one.

Just reading open knowledge? No need to log in; see Open knowledge.

Apps that connect by URL (Perplexity, claude.ai, ChatGPT) choose OAuth with no client ID or secret, then sign in on the BrainKB page that opens.

✓ tested with BrainKB · want the agent skill too? See Skill.

Claude Code · terminal
claude mcp add --scope user --transport http brainkb https://mcp.brainkb.org/mcp
  1. Start claude and say “log me in to BrainKB”; it hands you a browser link.
  2. For the server plus the BrainKB skill in one step, use npx brainkb install instead (Skill).
Skill

Connect with the BrainKB skill.

One command installs the BrainKB skill and registers this MCP server. The skill teaches your agent to confirm who it is acting as, ingest large files safely, pick the right workspace and question, and answer provenance questions.

1

Install Claude Code

terminal
npm install -g @anthropic-ai/claude-code
2

Install the skill Skill + MCP server

Adds the skill to ~/.claude/skills/brainkb and registers brainkb with Claude Code.

terminal
npx brainkb install

--scope project for this project only · --mcp both for production and sandbox · npx brainkb status to check.

3

Sign in and ask

Start claude, then:

prompt
log me in to BrainKB

Opens a browser sign-in (Globus, ORCID or GitHub). Then ask, e.g. “Which papers mention the subthalamic nucleus?”

Re-running install updates the skill; a copy you edited is never overwritten silently. npx brainkb uninstall removes it. Node.js 18.17+. brainkb on npm ↗ · Skill on GitHub ↗

From question to answer

Watch your agent
work with BrainKB.

Replays of real answers from BrainKB: naming variants, shared entities and trends by year across three papers, and a mapping review of the sandbox test graph. Then illustrative ingest and provenance flows. Pick a task to jump to it; hover to pause.

●●●   agent-sessionREAL DATA
› How is the neocortex written across the papers in BrainKB?
01   Confirms it is acting as you
02   Picks the naming-variants question from the ready-made set
03   Finds the entity neocortex in the graph
04   Groups every verbatim mention by paper
✓ 3 papers · 10 mentions, written as isocortex · neocortex · mouse neocortexSources: 10.1038/s41576-022-00509-1 · 10.7554/eLife.47889 · 10.3233/JAD-190687
Open by design

Every triple
has a history.

Ingests are attributed to the account that made them and recorded as W3C PROV-O, with the exact triples each job added. Your agent can only see or change what you are allowed to: your role decides what you may do, and a space's members and access rules decide who may read or write it.

What is BrainKB MCP?

A Model Context Protocol server for the BrainKB knowledge base. MCP clients such as Claude Code, Cursor, VS Code, Perplexity, claude.ai and ChatGPT connect to https://mcp.brainkb.org/mcp, and your agent can then work with workspaces, ingest, search, ready-made questions and provenance on your behalf.

Do I need to log in?

No, not to read open knowledge. Without logging in, your agent can list, search and read every public space; it is read-only, and private spaces stay hidden. You only need to log in to read your private spaces or to change anything (create a space, ingest, share), and for provenance, SPARQL and admin tools. See Open knowledge.

Can I use BrainKB through skills?

Yes. The BrainKB skill works alongside this server: install it in your agent, and it guides the agent through sign-in, ingest, questions and provenance using the server's tools.

How does my agent sign in?

With a personal access token sent as an Authorization: Bearer header, or through the Globus, ORCID or GitHub login tools, which hand you a browser link. Every call that needs an account runs as you. Reading public spaces needs no login.

How do I add BrainKB to Perplexity, claude.ai or ChatGPT?

Add a custom connector with the URL https://mcp.brainkb.org/mcp and choose OAuth, leaving the client ID and secret empty. The app registers itself and opens a BrainKB sign-in page; sign in with Globus, ORCID or GitHub, or paste a personal access token. If an app says the server "does not support automatic registration", it is not using OAuth discovery: pick OAuth explicitly, or use a client that does. Custom connectors may need a paid or developer plan in the app.

Who can see my data?

Private spaces are visible to their members only. Public spaces are readable by anyone, including unauthenticated clients. Ready-made questions currently need an Admin role.

How do I ingest a large file?

Stream it to /upload. The server answers 202 with an upload_id and ingests in the background, and your agent can follow the job from there. Up to 5 GB per file.

Large RDF file · python
import requests
requests.post("https://mcp.brainkb.org/upload",
              params={"filename": "review.ttl", "graph": "<graph_iri>"},
              headers={"Authorization": f"Bearer {TOKEN}"},
              data=open("review.ttl", "rb"))   # streamed off disk
How much data comes back at once?

Large answers come back a page at a time, so they never flood your agent. A SPARQL or ready-made question without its own LIMIT returns 500 rows per page (ask for up to 5000 with limit); the answer's page.next_offset says where the next page starts, and ORDER BY keeps pages stable. Any answer larger than about 80 kB is cut to its first rows, with a truncated note saying how to fetch the rest. For a count, ask for COUNT(*) first.

Are there usage limits?

Yes, so that one client cannot slow the service down for everyone. Per address, per minute: 600 requests, 30 new connections, 120 reads, 40 changes and 8 sign-ins. Each caller can run 6 calls at once. Past a limit, the server answers with a retryable error (HTTP 429, or 503 when it is busy) and says how long to wait. Agents should retry after that wait rather than immediately. Signed-in Admin and SuperAdmin accounts are not limited.

Why does /mcp say "Not Acceptable" in a browser?

That is the endpoint working correctly: a browser GET sends no Accept: text/event-stream, so the server refuses it. Use an MCP client.

Start working with BrainKB from your agent.

Register the server, sign in, and ask your first question.

Connect your agent