Brainkb

org.brainkb由 brainkb.org 發布官方發布者v0.1.0更新於 Nov 2, 2026

MCP server for querying BrainKB, a knowledge base for neuroscience knowledge graphs.

已驗證Streamable HTTP可網頁執行資料庫知識與記憶資料與分析

概覽

AI 產生的概覽

BrainKB 的遠端 MCP 伺服器,讓助理在神經科學知識圖譜平台中搜尋、讀取、匯入並管理 RDF 資料與空間。

可以做什麼
  • 搜尋知識圖譜並讀取空間內的全部 RDF 資料
  • 建立、更新、刪除空間與子空間,設定可見性,管理成員與已註冊的具名圖
  • 將 RDF 文字或本機 RDF 檔案匯入具名圖,並追蹤、復原或捨棄匯入工作與暫存上傳
  • 匯入 SynthScholar 文獻回顧,瀏覽其納入研究、篩選紀錄、證據片段與逐研究紀錄
  • 以密碼或 Globus/ORCID/GitHub 登入,並建立、列出、使用或撤銷個人存取權杖
適用情境
適合需要探索或向神經科學知識圖譜貢獻資料的情境,也適合讀取與查詢 SynthScholar 系統性回顧結果。公開空間不需登入即可搜尋與讀取。
執行需求
透過 streamable HTTP 連線至 mcp.brainkb.org 的遠端端點,無需安裝套件。讀取公開空間不需帳號;寫入、私有空間與權杖管理需要 BrainKB 帳號(密碼登入或 Globus/ORCID/GitHub OAuth),或透過 BRAINKB_TOKEN 提供個人存取權杖。
安裝前請注意
伺服器會處理帳號憑證與個人存取權杖;新建權杖只顯示一次,應保存為 BRAINKB_TOKEN。寫入操作會改動共享資料:刪除空間是永久且不可復原的,將空間設為公開會讓該空間及其所有子空間對匿名讀者可見。匯入的內容會傳送到託管的 BrainKB 後端。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Brainkb,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/org.brainkb%2Fbrainkb/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "brainkb": {
      "type": "http",
      "url": "https://mcp.brainkb.org/mcp"
    }
  }
}

README

BrainKB

BrainKB is a cutting-edge knowledge base platform designed to empower scientists worldwide by providing tools for searching, exploring, and visualizing Neuroscience knowledge through knowledge graphs (KGs). Additionally, BrainKB offers advanced tools that enable scientists to contribute new information to the platform, ensuring it remains the premier destination for neuroscience research.

BrainKB serves as a knowledge base platform that provides scientists worldwide with tools for searching, exploring, and visualizing Neuroscience knowledge represented by knowledge graphs (KGs). Moreover, BrainKB provides cutting-edge tools that enable scientists to contribute new information (or knowledge) to the platform, ensuring it remains the go-to destination for all neuroscience-related research needs.

Organization

  • Ingest Service Provides the service related to data ingestion and consumption using RabbitMQ. Not used currently.
  • GraphDB The docker compose configuration of GraphDB.
  • JWT User & Scope Manager A toolkit to manage JWT users and their permissions for API endpoint access.
  • Query Service Provides the functionalities for querying (and updating) the knowledge graphs from the graph database.
  • SPARQL Queries List of SPARQL queries tested or used in BrainKB.

Running

Quick Start

1. Setup Environment variables

Important: Change default passwords in .env for security.

bash
# Copy the environment templatecp env.template .env
# Edit .env with your configuration (make sure to change passwords!)nano .env  # or use your preferred editor
2. Start Services

Recommended: Use the wrapper script (includes Ollama setup + pgAdmin config):

bash
chmod +x start_services.sh./start_services.sh
3. Access Services

Once started, services are accessible at:

  • API Token Manager (Django): http://localhost:8000/
    • Once you register JWT user you need to activate it using token manager. You can also assign permission.
  • Query Service (FastAPI): http://localhost:8010/
    • Supports querying and ingestion of the knowledge graphs.
    • Native W3C PROV-O provenance in the graph database, with triple-level delta tracking (per-job delta graphs + query/compare endpoints).
    • Spaces: team-owned, private/public containers of named graphs — keep data private to members or publish it publicly (anonymous read). Per-endpoint JWT scopes (read/write/admin); role-based authorization (see query_service/RBAC_MODEL.md). Accepts both SSO (RS256/JWKS) and legacy HS256 tokens.
    • Search: hybrid full-text search — Postgres locator index (aware of workspace + visibility) finds subjects, data is fetched from Oxigraph. Results are access-filtered (anonymous sees public only).
    • See query_service/README.md, query_service/PROVENANCE_MODEL.md, and query_service/SPACES_MODEL.md for details.
  • ML Service (FastAPI): http://localhost:8007/
    • Integrates StructSense (multi-agent NER + structured-resource extraction).
    • Hosts SynthScholar at /api/synth-scholar/* — PRISMA-guided literature review pipeline (search → screening → critical appraisal → synthesis, with SSE progress streaming and markdown / JSON / RDF exports). Reuses the unified brainkb Postgres database. See env.template for the optional API keys (OpenRouter, NCBI, Semantic Scholar, CORE).
  • Oxigraph SPARQL: http://localhost:7878/ (password protected) graph database
  • pgAdmin: http://localhost:5051/
  • User management service (FastAPI): http://localhost:8004
    • Canonical identity service: user profiles, roles/RBAC, and OAuth sign-in (Globus / ORCID / GitHub). One canonical user; the credential row is linked to the profile (identity unification).
    • Single sign-on issuer (RS256 + JWKS): one login mints a refresh token, exchanged for narrow per-service access tokens (aud=<service>) that each service verifies via /.well-known/jwks.json. A token for one service can't be replayed against another. Legacy per-service HS256 tokens still work.
    • Admins can activate users and assign roles/groups. See query_service/AUTH_UNIFICATION.md and usermanagement_service/README.md.

Authentication

BrainKB is moving to a single sign-on model — usermanagement is the sole token issuer and each service verifies audience-scoped RS256 tokens against its JWKS, while legacy per-service HS256 tokens remain accepted during migration. Web sign-in returns both an access and a refresh token so the UI renews silently (USERMANAGEMENT_WEB_SESSION_TTL_MIN / USERMANAGEMENT_WEB_REFRESH_TTL_MIN). The full design, phases, and deployment env are in query_service/AUTH_UNIFICATION.md.

Please note: for the Query Service and ML Service, you won’t see anything at their base URLs. To verify they are running, open their API docs at http://localhost:8010/docs and http://localhost:8007/docs respectively.

Troubleshooting

If you encounter Docker mount errors or issues with file sharing, please refer to the Troubleshooting section in LOCAL_DEPLOYMENT.md.

Documentation

Please refer to the BrainKB documentation below for additional information regarding BrainKB, its rationale, deployment instructions, and lessons learned.

Contact

License

This project is licensed under the Apache License 2.0.

Copyright © 2024–Present Senseable Intelligence Group

You may obtain a copy of the license at: Apache License, Version 2.0

來源:readme.md,提交 b90fa36

工具

72

brainkb_login

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 refresh token, cached for THIS session, which is exchanged on demand for per-service access tokens (query_service, usermanagement, …). Falls back to a legacy per-service token if the backend has no SSO. On the hosted multi-user remote you can skip this and instead have your client send an 'Authorization: Bearer <token>' header (a refresh token unlocks all services).

輸入參數email必填base_urlpassword必填

brainkb_globus_login

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 browser; after signing in, the page shows a short one-time code — pass it to brainkb_finish_login(code) to complete. (The browser step is unavoidable: only the user can consent at the provider.)

輸入參數base_urlprovider

brainkb_finish_login

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.

輸入參數code必填base_url

brainkb_logout

Forget the cached token for this session.

無需輸入參數。

brainkb_whoami

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 hosted deployment is an internal address and says nothing about the caller's own machine.

無需輸入參數。

brainkb_create_token

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 and set it as BRAINKB_TOKEN in your MCP/skill config; then no login or browser is needed until it expires. `name`: a label so you can tell tokens apart (e.g. 'laptop'). `days`: lifetime (default 90, server-capped). Treat the returned token like a password.

輸入參數daysname

brainkb_list_tokens

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_revoke_token.

無需輸入參數。

brainkb_revoke_token

Revoke one of your Personal Access Tokens by id (see brainkb_list_tokens). Takes effect immediately — the next call using that token fails.

輸入參數token_id必填

brainkb_use_token

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 with it. The token is never echoed.

輸入參數token必填base_url

brainkb_list_spaces

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' | null (their space membership, including a role inherited from a parent space) - role_inherited: the role comes from a parent space, not this one - parent_slug: the parent space, when this is a subspace the caller can see the parent of (build the tree from it) - is_owner: they own the space - access: 'owner' | 'member' | 'public' (how it's available to them) - can_write: their space role permits ingest (owner/editor) — a real ingest also needs the 'ingest' capability + any per-space access rules. Use this to tell the user which spaces they can read vs. write vs. only see as public. No login needed: an unauthenticated caller gets the public spaces only (read-only). Log in to also see your own/member spaces. `owner` is shown only for spaces the caller is a member of; a public space read by a non-member never exposes its owner's email.

無需輸入參數。

brainkb_create_space

Create a workspace/space, or a subspace inside one. The caller becomes owner. slug: lowercase/hyphen id, **globally unique** — if it's already taken the call returns 409 (pick another slug). visibility: 'private' or 'public' (set per space: a private space may hold a public subspace); description: short human description (recommended — surfaces in the registry); space_type: 'individual' (a personal space — any write-capable role) or 'team' (a shared space — only Admin/SuperAdmin, or a user granted create_team_space). parent_slug: create it as a **subspace** of that space (any depth). Needs the right to manage the parent; the subspace takes the parent's space_type, and everyone with a role in the parent (or above) gets the same role in it. A subspace can't be moved to another parent later.

輸入參數name必填slug必填space_typevisibilitydescriptionparent_slug

brainkb_get_space

A space's details: graphs, members (direct, plus `inherited_members` with the parent space each comes from), visibility, `parent_slug`, `ancestors` (root first) and direct `subspaces` — only the ones the caller may see — and the caller's `your_role` / `role_inherited`. Public spaces need no login; member emails are shown to members and admins only.

輸入參數slug必填

brainkb_space_tree

A space and every subspace below it (any depth), nested: each node has slug, name, visibility, the caller's role and whether it's inherited from a parent, and its graph count. Only subspaces the caller may see are included.

輸入參數slug必填

brainkb_set_space_visibility

Set a space 'public' (anyone, even anonymous, can read) or 'private' (members only). Owner only. Everything in a public space is public: making a space public also makes all its subspaces public, and a subspace of a public space cannot be made private (409). Under a private space each subspace can be public or private on its own.

輸入參數slug必填visibility必填

brainkb_update_space

Rename a space, change its description, and/or give it a new slug. Owner/manager only. Pass only what changes; description="" clears it. `new_slug` (lowercase letters, digits and hyphens, 3-64 chars) moves the space's IRI and every graph whose IRI is built from the old slug (https://brainkb.org/graph/<slug>/…, …/synthscholar/<slug>/…) to the new slug, with their registry, search and history records and SynthScholar reviews; graphs with other IRIs keep theirs. The old slug and IRIs stay as aliases: they keep resolving and nobody else can take them, but ingest into an old IRI is refused with the new one. The result's `rename.moved_graphs` lists each from → to. 409 if the slug or a target graph is taken. Before calling with `new_slug`: show the user the graphs that will move and confirm.

輸入參數nameslug必填new_slugdescription

brainkb_delete_space

PERMANENTLY delete a space and everything in it. SuperAdmin only; irreversible. Drops the space's named graphs and the ingestion-history (delta) graphs that hold copies of their data, removes the graphs' registry entries and the space's RDF manifest, and deletes the space with its members, access rules, search entries and SynthScholar reviews (with their kept files). EVERY SUBSPACE below it, at any depth, is deleted the same way, deepest first (`subspaces_deleted`). Each deletion is kept in the provenance graph (who, when, which graphs: prov:invalidated). `confirm_slug` must equal `slug`. Before calling: show the user the space AND its subspaces (brainkb_space_tree) and what will be lost, and get their explicit confirmation in this conversation. Never call it to tidy up on your own initiative. A non-SuperAdmin caller gets 403; if a step fails (502) the message says which spaces were already deleted — the rest is untouched and it is safe to retry.

輸入參數slug必填confirm_slug必填

brainkb_add_space_member

Add/update a space member. role: 'owner' | 'editor' | 'viewer'. Owner only.

輸入參數roleslug必填member_email必填

brainkb_add_space_graph

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** — one graph belongs to exactly one space. If it's already registered (to any space) the call returns 409; graph bindings are permanent (no unregister/delete).

輸入參數slug必填descriptionnamed_graph_iri必填

brainkb_ingest_text

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 registered (see brainkb_add_space_graph) and the caller must have write access to its space. `sha256` / `expected_bytes` are an integrity contract, and you should use them whenever the RDF came from a file. Ingest is append-only — no delete for triples, no unregister for a graph — so RDF that arrives here mangled is permanent. Because `data` is a string, it passes through the caller's context, where dense Turtle is exactly what gets silently altered: ligatures, Greek letters, embedded newlines, escaped quotes. Declare the digest of the bytes you MEANT to send (`shasum -a 256 file.ttl`) and this refuses the write on any mismatch, turning an unrecoverable corruption into a clean rejection.

輸入參數data必填sha256expected_bytesnamed_graph_iri必填

brainkb_list_uploads

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.

無需輸入參數。

brainkb_upload_status

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 — `job_id` is set, poll brainkb_job_status) or `failed` (the staged bytes were KEPT, so retry with brainkb_ingest_upload rather than re-uploading).

輸入參數upload_id必填

brainkb_discard_upload

Delete one of your staged uploads without ingesting it.

輸入參數upload_id必填

brainkb_ingest_upload

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 the resulting upload_id here. The server reads its own staged copy and posts it to the ingest API internally, so the RDF never passes through a model's context — nothing to transcribe, no context-window ceiling, and no reason to split the document (splitting breaks blank-node identity and silently detaches triples, permanently). Stage a file with any HTTP client — the point is that the LIBRARY reads the file, so the bytes never pass through a model: import requests, hashlib, pathlib f = pathlib.Path("review.ttl") r = requests.post( "https://mcp.brainkb.org/upload", params={"filename": f.name, "sha256": hashlib.sha256(f.read_bytes()).hexdigest()}, headers={"Authorization": f"Bearer {TOKEN}"}, data=f.open("rb"), # streamed — never loaded into memory ) print(r.json()) # -> {"upload_id": "up_...", "state": "staged"} It returns an upload_id and the sha256 the server computed — compare it with your own before ingesting. Returns a job_id; poll brainkb_job_status, then reconcile brainkb_delta(job_id) against the triple count you expected. The staged copy is deleted once the ingest API has accepted the bytes.

輸入參數upload_id必填named_graph_iri必填

brainkb_ingest_files

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.

輸入參數file_paths必填max_concurrencynamed_graph_iri必填

brainkb_synthscholar_ingest

Ingest a SynthScholar review — the output directory of a run (the folder holding review.json and review.ttl, as the synthscholar skill writes it) — into a space you may write to (see brainkb_list_writable_spaces; you need to be its owner or an editor). A review is unique per space: the same run can go into several spaces, once each. Its graph, https://brainkb.org/synthscholar/<space>/reviews/<protocol.review_id>/, is registered in the space; review.ttl plus an import record (PROV-O: who, when, every kept file with media type, size and sha256, what was left out) are ingested as an ordinary job → job_id (poll brainkb_job_status, reconcile with brainkb_delta). Everything but work/ is kept and shown on the review's page. Once per review per space: the same run into the same space again is refused (409). Reads the MCP server's filesystem, so it follows brainkb_ingest_files' rules (MCP_INGEST_ROOT).

輸入參數output_dir必填space_slug必填

brainkb_synthscholar_list_reviews

Ingested SynthScholar reviews you can read (public spaces: anyone): id, title, research question, space, graph, included count, when ingested, ingest job. `q` filters on text in the title or research question.

輸入參數qspace

brainkb_synthscholar_studies

The included studies of an ingested review, filtered. `q`: text in title, authors, journal, DOI, PMID or keywords. `full_text`: true = read in full, false = abstract only. `source`: full-text route (europe_pmc, unpaywall, ezproxy, arxiv, …). `rob`: risk-of-bias rating (low, high, some concerns). Years inclusive. Each study: ids, title, authors, year, journal, how it was read and by which route, RoB. Paged (`total`, at most 200 per call).

輸入參數qroblimitspaceoffsetsourceyear_tofull_textreview_id必填year_fromwith_abstract

brainkb_synthscholar_screening

The screening audit trail of an ingested review: every decision with its stage (title_abstract | full_text), decision (include | exclude), what it was judged on (title_abstract | full_text | abstract_only), the full-text route and the reason. Filter by any of those, by text or criterion code in the reason (e.g. "EC2"), or by PMID. Also returns counts for the filtered set: by stage and decision, what decisions were judged on, and exclusion reasons by criterion.

輸入參數qpmidlimitspacestageoffsetreasondecisionreview_id必填assessed_on

brainkb_synthscholar_evidence

Evidence spans of an ingested review: the quoted text its claims rest on, with the study, section, relevance, and whether the quote was matched verbatim in the source (`grounded`). Filter by text, claim type, PMID or grounding.

輸入參數qpmidclaimlimitspaceoffsetgroundedreview_id必填

brainkb_synthscholar_records

Per-study records an ingested review produced. `kind`: `charting` (the data-charting form's answers per study), `appraisal` (critical appraisal by domain) or `narrative` (narrative synthesis rows: design, methods, outcomes, limitations). `q`: text in the answers (e.g. "neo4j" finds the studies that report it); `study`: source id (S-001), title, DOI or PMID; `fields`: comma-separated fields to return (the response lists the available ones).

輸入參數qkind必填limitspacestudyfieldsoffsetreview_id必填

brainkb_synthscholar_text

An ingested review's own text: `abstract`, `introduction`, `synthesis`, `bias`, `limitations`, `conclusions`, `research_question`, `search_queries` or `per_group` (the per-group analysis) — or all of them when `section` is empty.

輸入參數spacesectionreview_id必填

brainkb_synthscholar_find_study

Which ingested reviews (that you can read) include or screened a study — by DOI, PMID or part of its title (6+ characters) — and what happened to it in each: included (read in full or from the abstract) or each screening decision with its reason.

輸入參數doipmidtitle

brainkb_synthscholar_get_review

One ingested review: summary, its graph and space, the files kept (path, kind, media type, size, sha256), the run's search log and verification, the screening basis and full-text retrieval. Long texts and the per-study list are left out here — read them from the graph or the review page.

輸入參數spacereview_id必填

brainkb_list_jobs

List the user's ingest jobs (newest first) with status and progress.

輸入參數limit

brainkb_job_status

Detailed status of one ingest job: status, progress %, current file/stage, per-file failures, and (when complete) a summary.

輸入參數job_id必填

brainkb_recover_job

Attempt to recover a stuck/errored ingest job (marks it recoverable/errored).

輸入參數job_id必填

brainkb_read_space

Read all RDF (JSON-LD) in a space's graphs. Public spaces are readable by anyone without logging in (read-only); private spaces require login and membership. Don't ask the user to log in just to read a public space.

輸入參數slug必填

brainkb_list_writable_spaces

Spaces the caller can ingest into, each with its graphs (and descriptions) and `parent_slug` for subspaces — decided by the same checks ingestion uses: owner/ editor membership (including a role inherited from a parent space), a space write access rule, or Admin/SuperAdmin. `can_ingest` false means the caller has no write-capable role at all. `unmapped_graphs` are registered graphs in no space. Use this, not brainkb_list_registered_graphs, to choose where to ingest.

無需輸入參數。

brainkb_list_registered_graphs

List registered named graphs visible to the caller (private-space graphs the caller can't access are hidden).

無需輸入參數。

brainkb_sparql

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, which need no admin role. Large results come back a page at a time. A SELECT without its own LIMIT/OFFSET returns at most `limit` rows (0 = the server's page size, 500 by default) starting at `offset`; the response's `page` says whether there is more (`has_more`) and where to continue (`next_offset`). Add ORDER BY for stable pages. A query that sets its own LIMIT runs as written. Any result too big for one response is cut to its leading rows with a `truncated` note. Prefer COUNT(*) first when you only need to know how much there is.

輸入參數limitoffsetsparql_query必填

brainkb_qa_list

Find a canned question BrainKB can answer, then run it with brainkb_qa_run. Prefer these over writing SPARQL: they are vetted against BrainKB's actual vocabulary. Discovery is two steps, so you never read every query at once: 1. brainkb_qa_list() -> the menu: each category's name, a description of the questions it covers, and how many queries it has. Pick the category whose description matches the user's question. 2. brainkb_qa_list(category="<name>") -> that category's queries. Each has `question` (what it answers), `notes` (when to use it, where parameter values come from, what the results mean), `params` (required ones have no default — ask the user rather than guess) and a working `example`. `search="words"` filters queries by words in their id/question/notes; use it alone to search every category when none of the descriptions fits.

輸入參數searchcategory

brainkb_qa_run

Run a canned question from brainkb_qa_list by id. `params` maps parameter names to values; they are validated and escaped, never spliced in raw. Runs through the same SPARQL endpoint as brainkb_sparql, so it needs the same role. Results page the same way: a query without its own LIMIT returns `limit` rows from `offset`, and `page.next_offset` says where to continue.

輸入參數limitoffsetparamsquery_id必填

brainkb_provenance_job

PROV-O provenance bundle (JSON-LD) for one ingest job.

輸入參數job_id必填

brainkb_provenance_graph

PROV-O ingestion/activity history (JSON-LD) for a named graph.

輸入參數named_graph_iri必填

brainkb_delta

The exact triples a job added (its delta), as JSON-LD.

輸入參數job_id必填

brainkb_delta_history

A named graph's change history: one entry per ingest delta (job, triple count, timestamp), newest first.

輸入參數named_graph_iri必填

brainkb_delta_compare

Compare two jobs' deltas: A-only / B-only / shared triple counts + triples.

輸入參數job_id_a必填job_id_b必填

brainkb_capabilities

(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.

輸入參數member必填

brainkb_grant_capability

(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_team_space, manage_team_space, ingest, recover, read_private (NOT the admin-only 'grant'/'sparql_admin').

輸入參數member必填capability必填

brainkb_revoke_capability

(Admin only) Revoke a previously granted capability from a user.

輸入參數member必填capability必填

brainkb_list_capabilities

(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 granting to a user or group/role.

無需輸入參數。

brainkb_role_capabilities

(Admin only) List the capabilities granted to a role/group (e.g. 'uk_collaborator', 'Lab Member').

輸入參數role必填

brainkb_grant_role_capability

(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_private_space, create_team_space, manage_team_space, ingest, recover, read_private (NOT the admin-only 'grant'/'sparql_admin'). Create the group first with brainkb_create_role, then assign it to users with brainkb_assign_role.

輸入參數role必填capability必填

brainkb_revoke_role_capability

(Admin only) Revoke a capability from a role/group.

輸入參數role必填capability必填

brainkb_list_access_rules

List a space's fine-grained access rules (member/manager of the space).

輸入參數slug必填

brainkb_add_access_rule

(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' ('viewer'|'editor'|'owner', matched as >=). When rules exist for an action, only matching callers may perform it; the space owner and Admin/SuperAdmin always bypass (no lockout). Example: restrict writing to Admins -> action='write', subject_type='global_role', subject_value='Admin'.

輸入參數slug必填action必填subject_type必填subject_value必填

brainkb_remove_access_rule

(Space manager) Delete a fine-grained access rule by its id (see brainkb_list_access_rules).

輸入參數slug必填rule_id必填

brainkb_list_reserved_graphs

(Admin/SuperAdmin) List reserved named graphs: graph IRIs, or every IRI under a prefix, that only an Admin/SuperAdmin — or, when reserved for a space, that space's managers/editors — may register or bind. Includes the built-in system reservations (BrainKB's metadata and provenance graphs), which nobody can bind.

無需輸入參數。

brainkb_reserve_graph

(Admin/SuperAdmin) Reserve a named graph so other users can't create it. match_type 'exact' reserves one graph IRI; 'prefix' reserves every IRI starting with it (e.g. 'https://brainkb.org/graph/allen/'). Give a `reason` — it is shown to anyone who is refused. Optional `space_slug` reserves it for that space, whose managers/editors may then bind it. Graphs already bound stay where they are; the response lists them under `already_bound`. 409 if it is already reserved, overlaps a system graph, or is bound to another space than `space_slug`.

輸入參數iri必填reasonmatch_typespace_slug

brainkb_unreserve_graph

(Admin/SuperAdmin) Remove a reservation by its id (see brainkb_list_reserved_graphs). System reservations cannot be removed.

輸入參數reservation_id必填

brainkb_list_users

(Admin) List users (profiles) — filter by `q` (name/email/orcid) or `role`. Shows profile_id, email, roles, providers, ban status.

輸入參數qrolelimit

brainkb_available_roles

(Admin) List the available roles/groups (Admin, Lab Member, Curator, …).

無需輸入參數。

brainkb_create_role

(Admin) Create a new role/group — e.g. an 'External' collaborator group — which can then be assigned with brainkb_assign_role.

輸入參數name必填categorydescription

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 the 'Admin'/'SuperAdmin' role is SuperAdmin-only (hierarchy: SuperAdmin > Admin).

輸入參數role必填email必填

brainkb_remove_role

(Admin) Remove a role/group from a user by email.

輸入參數role必填email必填

brainkb_activate_user

(Admin) Activate a user's account (sets the JWT user active) by email.

輸入參數email必填

brainkb_deactivate_user

(Admin) Deactivate a user's account by email.

輸入參數email必填

brainkb_ban_user

(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 banned.

輸入參數email必填reason必填

brainkb_unban_user

(Admin) Lift a ban on a user by email.

輸入參數email必填

brainkb_list_permissions

(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 listed by brainkb_list_capabilities.

無需輸入參數。

brainkb_create_permission

(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.

輸入參數name必填action必填resource必填description

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。