@brain-mcps/setup
v0.1.0
Published
Configure AI assistant clients to connect to Brain4AI and Mentor4AI MCP servers
Downloads
56
Maintainers
Readme
@brain-mcps/setup
Configure AI assistant clients to connect to Brain4AI (Cerebro Externo) and Mentor4AI (Forge Mentor) MCP servers.
One command writes the correct config entry for any supported client, handling format differences (Gemini's httpUrl, Windsurf's serverUrl, Copilot's nested mcp.servers path, etc.).
Quick Start
npx @brain-mcps/setup gemini # Configure Gemini CLI for Cerebro Externo
npx @brain-mcps/setup gemini mentor # Configure Gemini CLI for Forge Mentor
npx @brain-mcps/setup --detect # Auto-detect and configure all installed clientsAfter running, open the configured client. It will prompt you to authenticate via OAuth (magic link to your email).
Supported Clients
| Client | Config Format | Key Used |
| -------------- | ------------------------- | ---------------------------------- |
| Claude Code | ~/.claude/settings.json | url |
| Claude Desktop | OS-specific config | url |
| Gemini CLI | ~/.gemini/settings.json | httpUrl |
| Codex | ~/.codex/config.toml | url (TOML) |
| Cursor | ~/.cursor/mcp.json | url |
| Windsurf | ~/.windsurf/mcp.json | serverUrl |
| GitHub Copilot | ~/.vscode/mcp.json | url (nested under mcp.servers) |
Usage
# Configure a specific client
npx @brain-mcps/setup <client> [product]
# Auto-detect installed clients and configure all
npx @brain-mcps/setup --detect [product]
# Preview changes without writing files
npx @brain-mcps/setup gemini --dry-run
# List all supported clients and their config paths
npx @brain-mcps/setup --listProducts
brain(default): Cerebro Externo athttps://mcp.brain4ai.app/mcpmentor: Forge Mentor athttps://mcp.mentor4ai.app/mcp
Clients
Use any of these as the <client> argument:
claude-code, claude-desktop, gemini, codex, cursor, windsurf, copilot
How It Works
- Reads the target client's JSON config file (or creates it if missing)
- Merges in the MCP server entry with the correct key format for that client
- Writes the file back, preserving all existing entries
If the server is already configured with the same URL, it reports already_configured and makes no changes.
Authentication
After configuring a client, the first time you use it the client will trigger an OAuth flow:
- A browser opens for sign-in
- Enter the email from your alpha invite
- Check your inbox for a magic link
- Click the link to complete authentication
Troubleshooting
Config file not found
Run npx @brain-mcps/setup --list to see the expected config path for each client. The CLI creates the file and parent directories automatically.
OAuth fails in the browser
- Make sure your email matches the alpha invite
- Magic links expire after 10 minutes; request a new one
- Try clearing browser cookies for the authentication domain
Client doesn't pick up changes
Some clients require a restart after config changes. Close and reopen the client.
License
MIT
