thebrain
v0.3.0MCP server for TheBrain 15: search by meaning, graph traversal and batch writes over the local API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
brain_list
Lists the user's brains and which one is currently open in the app. Call this first in any session: every other tool needs a brainId and guessing one is not allowed. Also shows whether the semantic index is ready.
brain_get_thought
A thought in full: note, aliases, parents, children, jumps, tags, type and attachments in one call. The main way to understand a thought's context. Call it when you need to know what a thought is about and how it connects, before changing or extending it.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string | Thought identifier. |
includeSiblings | boolean | Include siblings under the same parent. Off by default — there can be many. |
brain_search
Finds thoughts by meaning. Call it when looking for something by description rather than exact title — for instance to check whether a thought on this topic already exists. Always pass variants: several phrasings of the same concept (synonyms, translation, a broader and a narrower term). They raise recall noticeably, and if the semantic index is not built they are all that works.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
query * | string | What you are looking for, in your own words. |
includeAuxiliary | boolean | Include types and tags in results. By default only ordinary thoughts. |
limit | integer | Defaults to 15. |
variants | array | Other phrasings of the same concept: synonyms, a translation into the second language, a broader and a narrower term. Three to six of them, at most 10. |
brain_traverse
Walks the graph several hops out from a thought. Call it when you need to see the whole neighbourhood: which region of the brain adjoins a topic, where new material should slot in, what already sits nearby. Viewing a thought shows one hop only.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string | Where to start. |
depth | integer | Hops. Defaults to 2. |
follow | array | Which link kinds to follow. All of them by default. |
maxNodes | integer | Safety valve. Defaults to 150. |
brain_list_types_and_tags
The brain's vocabulary: which thought types and tags exist. Call it before creating thoughts so you use this brain's established conventions instead of inventing new ones.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
brain_recent_changes
What changed in the brain over a period, in plain language. Call it for digests ("what did I add this week") and to understand what work was in progress before continuing it.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
identifiers | boolean | true adds a list of the thoughts in the result with their identifiers, for reading or changing one next. Defaults to false. |
limit | integer | Defaults to 100. |
since | string | ISO timestamp to start from, UTC unless it carries an offset. Defaults to the last seven days. |
brain_index
Manages the semantic index: status, build, refresh. Call with action=status when brain_search complains the index is missing; with action=rebuild to build it for the first time or after changing the model; with action=sync to pull in changes (fast, new material only). The first build on a large brain takes minutes.
| Parameter | Type | Description |
|---|---|---|
action * | string | status — look only; rebuild — build from scratch; sync — catch up. |
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
brain_create_thought
Creates a thought and sets its note, type, tags and aliases in the same call. Call it when adding something new. Always supply parentId — a thought with no links gets lost in the graph. Search first: a suitable thought may already exist, in which case extending it is the better move.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
name * | string | Thought title. Short and to the point. |
aliases | array | Alternate names that TheBrain's search matches too. Saving a brain's first alias makes that brain require TheBrain 15.0.621 or later on every device, so write aliases only when the user wants them in… |
label | string | Short caption under the title. |
note | string | Note body in Markdown. |
parentId | string | What to attach it to. Without this the thought is left orphaned. Not a type: a thought made under one would get that type and no parent, so a type goes in typeId. Not a tag either: that goes in tagIds… |
relation | string | How the new thought relates to that one. Child by default. For a sibling of a thought, give that thought's parent as parentId. Refused without parentId. |
tagIds | array | Tag identifiers from brain_list_types_and_tags. |
typeId | string | Type identifier from brain_list_types_and_tags. |
brain_update_thought
Changes a thought's properties: title, caption, aliases, type, colours. Call it to rename or reclassify. It does not touch the note — use brain_set_note or brain_append_note for that.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string | Which thought to change. |
addAliases | array | Alternate names to add to the ones the thought has; TheBrain's search matches them too. Saving a brain's first alias makes that brain require TheBrain 15.0.621 or later on every device, so write alias… |
backgroundColor | string | null | Background colour; null clears it. |
foregroundColor | string | null | Text colour, for example #ff7145; null clears it. |
label | string | null | Caption; null clears it. |
name | string | New title. |
removeAliases | array | Aliases to drop, matched ignoring case. |
typeId | string | null | Type identifier from brain_list_types_and_tags; null removes the type. |
brain_set_note
Replaces a thought's note entirely. The previous text is lost — to add rather than replace, call brain_append_note. Read an existing note with brain_get_thought before overwriting it.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
markdown * | string | The complete new note body, in Markdown. |
thoughtId * | string |
brain_append_note
Appends text to the end of a note without erasing anything. The main way to accumulate material on a thought. If no note exists yet, one is created.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
markdown * | string | What to append, in Markdown. |
thoughtId * | string |
brain_link
Links two thoughts. Call it when you spot a meaningful relationship between existing thoughts — links are what make a brain a graph rather than a list. Label the link via name: "motivates", "solved by", "contradicts". Two thoughts share one link: where one joins them already nothing is added, and the result says what is there.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
fromId * | string | Source thought. |
toId * | string | Target thought. |
name | string | Link label: how exactly one relates to the other. |
relation | string | How the target relates to the source. Defaults to jump — a sideways link that leaves the hierarchy alone. Siblings are not linked to each other: they are thoughts with a parent in common. A type can… |
replace | boolean | Make a link of another kind that joins the two into this one: a jump into a parent-child link, or the other end above. It keeps its identifier, and its label unless name gives one. Never a tag or a ty… |
brain_unlink
Removes the link between two thoughts, with its label. There is no undo. Requires human confirmation. Call it only when the user asked for the link to go. brain_link with replace changes a link's kind; a tag goes with brain_tag, a type with brain_update_thought.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
fromId * | string | One end of the link. |
toId * | string | The other end. |
confirm | boolean | Set to true only after a human has confirmed the deletion. Do not decide this on their behalf. |
brain_tag
Attaches and removes a thought's tags. Tags are separate thoughts of a special kind; take their identifiers from brain_list_types_and_tags, and create a new tag via brain_create_type_or_tag. A single call can both add and remove.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string | |
add | array | Tag identifiers to attach. |
remove | array | Tag identifiers to remove. |
brain_create_type_or_tag
Creates a thought type or a tag: the vocabulary thoughts are classified with, which brain_create_thought cannot make. Call it when brain_list_types_and_tags has none that fits. Under the name of a tag the brain has, in any letter case, no second tag is made and the result gives that one. A type is made even when another has the name.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
kind * | string | A type is what typeId takes; a tag is what brain_tag and tagIds take. |
name * | string | Its name, as TheBrain will show it. |
brain_attach_url
Attaches a link to a thought. Checks first whether the same URL is already attached and avoids duplicates. Leave name empty to take the title from the page.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string | |
url * | string | Page address. |
name | string | Attachment name; empty means use the page title. |
brain_activate
Opens a thought in the user's TheBrain app on screen. Call it to show the person a result — for instance a structure you have just created, so they can see it in the graph.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string |
brain_delete_thought
Permanently deletes a thought along with its note and links. There is no undo. Requires human confirmation. Do not call it to tidy up on your own initiative — only when the user explicitly asked for a deletion.
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughtId * | string | |
confirm | boolean | Set to true only after a human has confirmed the deletion. Do not decide this on their behalf. |
brain_ingest
Writes a whole structure of thoughts, links, notes, tags and aliases in a single call. Call it once you have decomposed some material (an article, a document, a discussion) into several connected thoughts — creating them one by one at that volume is slow and breaks halfway. Thoughts reference each other by tempId, arbitrary labels you invent yourself; the server substitutes real identifiers. A parent may be either a tempId from this batch or the UUID of an existing thought, which is how a new branch grafts onto what the brain already holds. Search with brain_search first: some of the thought…
| Parameter | Type | Description |
|---|---|---|
brainId * | string | Brain identifier. Take it from brain_list — never guess it. |
thoughts * | array | The batch's thoughts. Order does not matter; dependencies resolve themselves. |
deduplicate | boolean | Skip creating a thought when its parent already has one of that name under the same relation. On by default, which makes re-running a batch safe. A thought of that name under another relation is neith… |
links | array | Extra links on top of the hierarchy. These are what turn a set of thoughts into a graph — use them freely and label them. Neither a type nor a tag can be the parent end of a child or parent link: se… |