org.brainkb/brainkb
org.brainkb/brainkbMCP server for querying BrainKB, a knowledge base for neuroscience knowledge graphs.
Tools · 53
Authenticate to BrainKB with the user's credentials and cache the JWT for THIS session only (isolated per caller). The password/token are never echoed. Uses single sign-on: one login mints a …
Start an OAuth login (Globus / ORCID / GitHub) for THIS session — use this instead of brainkb_login when the user signs in with Globus rather than a password. Returns a URL to open in a browse…
Complete an OAuth login started with brainkb_globus_login by exchanging the one-time code shown in the browser for a session token. The code is single-use and never echoed back.
Forget the cached token for this session.
Report the current caller's auth state (email, authenticated, and when the cached session expires). When signed in it also returns base_url — the backend THIS SERVER talks to, which on a hoste…
Generate a Personal Access Token (PAT) for browser-free auth. Requires you to be logged in already (brainkb_login or brainkb_globus_login). The token is shown ONCE and never again — copy it an…
List your Personal Access Tokens (metadata only — the secret is never shown): id, name, prefix, created/last-used/expiry, and whether each is active/revoked/expired. Use the id with brainkb_re…
Revoke one of your Personal Access Tokens by id (see brainkb_list_tokens). Takes effect immediately — the next call using that token fails.
Use a Personal Access Token (brainkb_pat_...) for THIS session — an alternative to setting BRAINKB_TOKEN in the config. Validates the token, then caches it so subsequent calls authenticate wit…
List spaces the user can see (their own/member spaces + public ones), each annotated with THIS caller's permission so you know what they may do: - your_role: 'owner' | 'editor' | 'viewer' | …
Create a workspace/space. The caller becomes owner. slug: lowercase/hyphen id, **globally unique** — if it's already taken the call returns 409 (pick another slug; slugs are never reused/delet…
Set a space 'public' (anyone, even anonymous, can read) or 'private' (members only). Owner only.
Add/update a space member. role: 'owner' | 'editor' | 'viewer'. Owner only.
Register a named graph and bind it to a space, so ingest/read on that graph are governed by the space's membership and visibility. Owner/editor only. The named_graph_iri is **globally unique**…
Ingest raw RDF text (Turtle / N-Triples / JSON-LD, auto-detected) into a named graph. Returns a job_id; ingestion runs in the background — poll with brainkb_job_status. The graph must be regis…
List RDF files YOU have staged with POST /upload but not yet ingested. Shows each upload_id, its size, sha256 and when it expires. Only your own uploads are visible.
State of one of your staged/submitted uploads. `state` is `staged` (waiting for brainkb_ingest_upload), `submitting` (the server is streaming it to the ingest API), `submitted` (accepted — `j…
Delete one of your staged uploads without ingesting it.
Ingest a file you staged with `POST /upload` into a named graph. This is the route for a large local file: your HTTP client streams the bytes straight to this server over HTTPS, then you name…
Ingest local RDF files (ttl/nt/nq/rdf/owl/jsonld/json) into a named graph. Returns a job_id; runs in the background — poll with brainkb_job_status.
List the user's ingest jobs (newest first) with status and progress.
Detailed status of one ingest job: status, progress %, current file/stage, per-file failures, and (when complete) a summary.
Attempt to recover a stuck/errored ingest job (marks it recoverable/errored).
Full-text search over the knowledge graphs, access-filtered by space visibility. Pass `space` to scope to one workspace, omit for a full search. Anonymous/other users never see private-space d…
Read all RDF (JSON-LD) in a space's graphs. Public spaces are readable by anyone; private spaces require membership.
List registered named graphs visible to the caller (private-space graphs the caller can't access are hidden).
Run an arbitrary SPARQL query. Requires an Admin/SuperAdmin role (the sparql_admin capability) — for ordinary questions prefer brainkb_search, brainkb_read_space, or the provenance/delta tools…
PROV-O provenance bundle (JSON-LD) for one ingest job.
PROV-O ingestion/activity history (JSON-LD) for a named graph.
The exact triples a job added (its delta), as JSON-LD.
A named graph's change history: one entry per ingest delta (job, triple count, timestamp), newest first.
Compare two jobs' deltas: A-only / B-only / shared triple counts + triples.
(Admin only) Show a user's roles, effective capabilities, and delegated grants. Useful to check why someone can/can't create team spaces, ingest, etc.
(Admin only) Delegate a capability to a user — e.g. 'create_team_space' or 'manage_team_space' so a Curator/Lab Member can create/manage team spaces. Grantable: create_private_space, create_te…
(Admin only) Revoke a previously granted capability from a user.
(Admin only) Catalog of all KG capabilities, which are delegatable ('grantable'), which are admin-only, and a description of each. Use this to see the available permission options before grant…
(Admin only) List the capabilities granted to a role/group (e.g. 'uk_collaborator', 'Lab Member').
(Admin only) Grant a capability to a whole role/group so EVERY member gets it — e.g. give a custom group 'uk_collaborator' the 'ingest' or 'create_private_space' capability. Grantable: create_…
(Admin only) Revoke a capability from a role/group.
List a space's fine-grained access rules (member/manager of the space).
(Space manager) Restrict a space action to a subject. action: 'read' | 'write' | 'manage'. subject_type: 'global_role' (e.g. 'Admin','Lab Member') | 'member' (an email) | 'space_role' ('vi…
(Space manager) Delete a fine-grained access rule by its id (see brainkb_list_access_rules).
(Admin) List users (profiles) — filter by `q` (name/email/orcid) or `role`. Shows profile_id, email, roles, providers, ban status.
(Admin) List the available roles/groups (Admin, Lab Member, Curator, …).
(Admin) Create a new role/group — e.g. an 'External' collaborator group — which can then be assigned with brainkb_assign_role.
(Admin) Assign a role/group to a user by email (e.g. 'Lab Member', 'External', or a custom group). The user must already have a profile (created on first login/registration). NOTE: assigning t…
(Admin) Remove a role/group from a user by email.
(Admin) Activate a user's account (sets the JWT user active) by email.
(Admin) Deactivate a user's account by email.
(Admin) Ban a user by email (reversible; preserves history). This is how accounts are removed — there is NO hard delete. Banning an Admin is SuperAdmin-only; SuperAdmin accounts cannot be bann…
(Admin) Lift a ban on a user by email.
(Admin) List all usermanagement permissions (resource/action pairs used for page-access and role-permission mapping). These are the addable 'permission' options; KG action-capabilities are lis…
(Admin) Create a new usermanagement permission, e.g. name='dataset.export', resource='dataset', action='export'. Attach it to roles via the usermanagement role-permissions API.
Similar MCP servers embedding-nearest
How to use
Add to your Claude Desktop / Cursor / Cline MCP config:
{
"mcpServers": {
"org.brainkb/brainkb": {
"url": "https://mcp.brainkb.org/mcp",
"transport": "streamable-http"
}
}
}