toggle-brain MCP Server
Exposes the Toggle Brain knowledge base, prompt templates, and executable scripts to any MCP-compatible AI assistant.
README
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 lives in the toggle-brain repository and is automatically synced here on every push. You never need a GitHub token, API keys, or manual updates at runtime — just clone, build, and connect.
What it exposes
| MCP primitive | Source in toggle-brain | Example |
|---|---|---|
| Resources | brain/, cockpit/, clients/, templates/, archive/ |
kb://brain--services--copywriting |
| Prompts | generators/, playbooks/ |
generators--email-sequence |
| Tools | Any .ts or .py file in the repo |
brain_scripts_audit |
Prerequisites
- Node.js 20 LTS or later
That's it. No tokens, no API keys, no external services.
Setup
1. Clone the repo
git clone https://github.com/toggle-workspace/toggle-mcp.git
cd toggle-mcp
2. Install dependencies and build
npm install
npm run build
3. Verify it works
node dist/index.js
# Loaded: 153 resources, 15 prompts, 1 tools
Connecting to Claude Code
From inside the cloned toggle-mcp directory, run:
claude mcp add toggle-brain node "$(pwd)/dist/index.js"
Then run /mcp inside a Claude Code session to confirm it is connected:
/mcp
# toggle-brain — Connected
Connecting to Cursor
Add to ~/.cursor/mcp.json (or via Cursor Settings → MCP):
{
"mcpServers": {
"toggle-brain": {
"command": "node",
"args": ["/path/to/toggle-mcp/dist/index.js"]
}
}
}
Replace /path/to/toggle-mcp with the actual path where you cloned the repo.
Connecting to Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"toggle-brain": {
"command": "node",
"args": ["/path/to/toggle-mcp/dist/index.js"]
}
}
}
Replace /path/to/toggle-mcp with the actual path where you cloned the repo.
Remote / HTTP mode
Set TRANSPORT=http to run as an SSE server on a fixed port:
TRANSPORT=http PORT=3000 node dist/index.js
Point 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--copywritingdirectly - Run prompt templates — ask it to use a prompt like
generators--email-sequencewith your variables filled in - Execute tools — any
.tsor.pyscripts from toggle-brain are callable as tools
In Claude Code, confirm what is loaded at any time:
/mcp
For maintainers
How the sync works
Content in this repo is kept up to date by a two-step GitHub Actions pipeline:
- toggle-brain runs
.github/workflows/notify-mcp.ymlon every push tomain. This workflow dispatches arepository_dispatchevent of typetoggle-brain-updatedto thetoggle-mcprepository. - toggle-mcp has
.github/workflows/sync-brain.ymlwhich listens for that event, checks out toggle-brain, copies its contents into this repo, and commits and pushes the result.
The MCP server reads from the local content/ directory at runtime — no network calls, no tokens required for end users.
Required secret
The toggle-brain notify workflow needs a GitHub PAT stored as a repository secret named GH_PAT. This token must have:
- repo scope (to dispatch events to toggle-mcp)
- workflow scope (to trigger Actions workflows)
Add it at: toggle-brain repo → Settings → Secrets and variables → Actions → New repository secret
Adding the notify workflow to toggle-brain
See TOGGLE_BRAIN_SETUP.md for the step-by-step guide. In short, create .github/workflows/notify-mcp.yml in the toggle-brain repository with the content from toggle-brain-notify-workflow.yml in this repo.
Once this is in place, every push to toggle-brain/main will automatically update the content in this repo within seconds.
Troubleshooting
| Symptom | Fix |
|---|---|
toggle-brain not in /mcp list |
Re-run claude mcp add ... and restart the session |
| Resources show as empty or missing | Run git pull to get the latest synced content, then rebuild |
| Build fails with type errors | Ensure Node.js 20 or later is installed (node --version) |
| Sync Action fails in toggle-brain | Check that the GH_PAT secret is set with repo and workflow scopes |
| Sync Action fails in toggle-mcp | Check that sync-brain.yml is present and the dispatch event type matches brain-updated |
| HTTP mode not reachable | Confirm TRANSPORT=http and PORT are set, and that the port is not blocked by a firewall |
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。