Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
THEBRAIN_API_KEYYesRequired API key for TheBrain local API
THEBRAIN_BASE_URLNoLocal API addresshttp://localhost:8001
THEBRAIN_DATA_DIRNoWhere indexes are stored~/.thebrain-mcp
THEBRAIN_TIMEOUT_MSNoAPI request timeout30000
THEBRAIN_EMBEDDING_DTYPENoWeight precisionq8
THEBRAIN_EMBEDDING_MODELNoEmbedding modelXenova/multilingual-e5-small
THEBRAIN_ALLOW_DESTRUCTIVENoAllow deleting thoughts0

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
brain_listA

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_thoughtA

A thought in full: note, 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.

brain_searchA

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.

brain_traverseA

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.

brain_list_types_and_tagsA

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.

brain_recent_changesA

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.

brain_indexA

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.

brain_create_thoughtA

Creates a thought and sets its note, type and tags 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.

brain_update_thoughtA

Changes a thought's properties: title, caption, type, colours. Call it to rename or reclassify. It does not touch the note — use brain_set_note or brain_append_note for that.

brain_set_noteA

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.

brain_append_noteA

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.

brain_linkA

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

brain_tagA

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_thought. A single call can both add and remove.

brain_attach_urlB

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.

brain_activateA

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.

brain_delete_thoughtA

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.

brain_ingestA

Writes a whole structure of thoughts, links, notes and tags 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 thoughts may already exist, and linking to them beats creating duplicates.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yBookoff/thebrain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server