toggle-brain MCP Server
Provides access to the Toggle Brain knowledge base, including resources, prompt templates, and executable scripts from the toggle-brain repository.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@toggle-brain MCP Serversummarise the Toggle Brain positioning docs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
toggle-brain MCP Server
A Model Context Protocol server that exposes the Toggle Brain knowledge base, prompt templates, and executable scripts to any MCP-compatible AI assistant — Claude Code, Cursor, Windsurf, and more.
Content is fetched live from the toggle-brain GitHub repository on startup — no submodule, no manual sync. Whenever toggle-brain is updated, restarting the server picks up the latest content automatically.
What it exposes
MCP primitive | Source in toggle-brain | Example |
Resources |
|
|
Prompts |
|
|
Tools | Any |
|
Related MCP server: lifeos-mcp
Prerequisites
Node.js 20 LTS or later
A GitHub fine-grained PAT with read-only Contents access to
toggle-workspace/toggle-brain
Generating the token
Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
Click Generate new token
Set:
Token name:
toggle-mcp-content-readResource owner:
toggle-workspaceRepository access: Only select repositories →
toggle-brainPermissions → Contents: Read-only
Copy the token immediately after generating
Setup
1. Clone the repo
git clone https://github.com/toggle-workspace/toggle-mcp.git
cd toggle-mcp2. Install dependencies and build
npm install
npm run build3. Add your token
Create a .env file in the project root:
BRAIN_READ_TOKEN=github_pat_your_token_hereThe .env file is gitignored and never committed.
4. Verify it works
node dist/index.js
# Fetching content from toggle-brain...
# Loaded: 153 resources, 15 prompts, 1 toolsConnecting to Claude Code
Option A — CLI (recommended)
claude mcp add toggle-brain node /absolute/path/to/toggle-mcp/dist/index.jsThe server needs BRAIN_READ_TOKEN available when Claude Code launches it. Add it to your shell profile (.zshrc / .bashrc):
export BRAIN_READ_TOKEN=github_pat_your_token_hereThen reload your shell and restart Claude Code.
Verify it connected:
claude mcp list
# toggle-brain: node ... - ✓ ConnectedOption B — .mcp.json (project-scoped)
Create .mcp.json at the root of any project:
{
"mcpServers": {
"toggle-brain": {
"command": "node",
"args": ["/absolute/path/to/toggle-mcp/dist/index.js"],
"env": {
"BRAIN_READ_TOKEN": "github_pat_your_token_here"
}
}
}
}Run /mcp in a Claude Code session to reload.
Connecting to Cursor
Add to ~/.cursor/mcp.json or via Cursor Settings → MCP:
{
"mcpServers": {
"toggle-brain": {
"command": "node",
"args": ["/absolute/path/to/toggle-mcp/dist/index.js"],
"env": {
"BRAIN_READ_TOKEN": "github_pat_your_token_here"
}
}
}
}Connecting to Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"toggle-brain": {
"command": "node",
"args": ["/absolute/path/to/toggle-mcp/dist/index.js"],
"env": {
"BRAIN_READ_TOKEN": "github_pat_your_token_here"
}
}
}
}Remote / HTTP mode
Set TRANSPORT=http to run as an SSE server:
TRANSPORT=http PORT=3000 node dist/index.jsPoint any MCP client at http://localhost:3000/sse.
Usage
Once connected, the AI assistant can:
Browse knowledge — ask it to read resources like "summarise the Toggle Brain positioning docs" or reference
kb://brain--services--copywritingRun prompt templates — ask it to use a prompt like
generators--email-sequencewith your variables filled inExecute tools — any
.tsor.pyscripts in toggle-brain are callable as tools
In Claude Code, confirm what's loaded at any time:
/mcpGetting the latest content
Content is fetched fresh from toggle-brain every time the server starts. To pick up new content, simply restart your AI assistant (or reload the MCP server).
Troubleshooting
Symptom | Fix |
| Add the token to |
| Token is invalid or expired — regenerate it |
| Token doesn't have access to toggle-brain — check repo permissions |
| Re-run |
Build fails with type errors | Ensure Node.js 20+ is installed |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/toggle-workspace/toggle-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server