Brain

Exposes Brain service operations as MCP tools via FastMCP, enabling save, quick capture, search, and retrieval of thoughts.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "greghughespdx-brain-mcp-server": {
      "command": "python",
      "args": [
        "brain_mcp_server.py"
      ],
      "env": {
        "BASE_URL": "http://{MCP_HOST}:{MCP_PORT}",
        "MCP_HOST": "0.0.0.0",
        "MCP_PORT": "8084",
        "MCP_TRANSPORT": "stdio",
        "OAUTH_ENABLED": "false",
        "BRAIN_API_BASE": "https://n8n.gregslab.org/webhook",
        "BRAIN_API_TIMEOUT": "30.0"
      }
    }
  }
}

You can run the Brain MCP Server to expose Brain service operations as MCP tools. It supports local development via stdio or remote access via SSE, and you can test and automate interactions with an MCP client as you build your workflows around saving, classifying, and retrieving thoughts.

How to use

You connect your MCP client to the Brain MCP Server using either local stdio mode or remote SSE mode. In stdio mode, you run the server in the same environment as your client and communicate through standard input/output. In SSE mode, you enable remote access over HTTP with OAuth 2.0 support for secure communication. Once connected, you can use the available tools to save thoughts, capture and classify them, search your brain data, and fetch specific entries.

How to install

Prerequisites: you need Python installed on your system. You also need network access for optional remote features. Optional: Docker can be used for deployment.

pip install -r requirements.txt

Run the server in local stdio transport mode. This starts the MCP server to communicate through standard I/O.

python brain_mcp_server.py

Run the server with SSE transport for remote access. This enables HTTP-based communication on port 8084 by default.

MCP_PORT=8084 MCP_TRANSPORT=sse python brain_mcp_server.py

Test and interact with the server using the MCP inspector or your preferred MCP client.

mcp dev brain_mcp_server.py

If you want to run the server in a container, you can deploy with Docker. This builds from source and runs the server with SSE transport on the default port.

docker compose up -d

Additional notes

Environment variables you may configure include the Brain API base URL, timeouts, transport mode, port, host, and OAuth settings. For local development, you can keep defaults or customize as needed.

Available tools

save_to_brain

Save a thought with comprehensive metadata to Brain. Uses a structured format to preserve context and attributes for later retrieval.

quick_capture

Capture a thought quickly with automatic classification to organize and categorize entries.

search_brain

Search saved thoughts by text queries to retrieve relevant entries from Brain.

list_recent

List recent entries with filters to help you browse the latest Brain activity.

get_entry

Fetch a specific Brain entry by its ID for detailed viewing.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational