three.ws Brain — Claude Code MCP server: features and setup
Discover models exposed by the three.ws router and send them chat requests from an AI agent. Useful when you want to choose a provider without wiring up its SDK yourself.
claude mcp add --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_API_KEY=<THREE_WS_API_KEY> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --transport stdio brain-mcp -- npx -y @three-ws/brain-mcpWhat three.ws Brain does
three.ws Brain gives an agent two tools. list_providers returns reachable models with their tier and authentication status; chat sends a message history to a selected model. The provider list can change, so fetch it before choosing a model. Chat results include the route used and token usage.
Open-weight models in the free tiers, including GPT-OSS 120B and NVIDIA NIM models, work without a key. Paid models require THREE_WS_API_KEY; requests to them without one return an authentication error. The server runs through npx and requires Node.js 20 or later, plus network access to three.ws.
You can connect it to Claude Code, Codex, Cursor, and GitHub Copilot. Node.js below version 20 won’t run the server.
What it helps with
- check which models the router can reach
- find out which providers require authentication
- send a message history to a chosen model
- inspect the route used for a chat response
Example prompts for the agent
- List the available models and show which ones need a key.
- Send this question to
gpt-oss-120band return its answer. - Check model availability before choosing a provider.
How to install three.ws Brain
Platform CLI
claude mcp add --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_API_KEY=<THREE_WS_API_KEY> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --transport stdio brain-mcp -- npx -y @three-ws/brain-mcpReplace <…> with your own values
Platform CLI
codex mcp add brain-mcp --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_API_KEY=<THREE_WS_API_KEY> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> -- npx -y @three-ws/brain-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"brain-mcp": {
"command": "npx",
"args": [
"-y",
"@three-ws/brain-mcp"
],
"env": {
"THREE_WS_BASE": "<THREE_WS_BASE>",
"THREE_WS_API_KEY": "<THREE_WS_API_KEY>",
"THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"brain-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@three-ws/brain-mcp"
],
"env": {
"THREE_WS_BASE": "<THREE_WS_BASE>",
"THREE_WS_API_KEY": "<THREE_WS_API_KEY>",
"THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e THREE_WS_BASE=<THREE_WS_BASE> -e THREE_WS_API_KEY=<THREE_WS_API_KEY> -e THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> brain-mcp npx -y @three-ws/brain-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about three.ws Brain
How do I install three.ws Brain in Claude Code?
Run claude mcp add brain-mcp -e THREE_WS_API_KEY=<THREE_WS_API_KEY> -- npx -y @three-ws/brain-mcp. Provide your three.ws key to access paid models.
What does three.ws Brain do?
It lists models reachable through the three.ws router and sends chat requests to a selected provider. The chat result includes the reply, route details, and token usage.
Does three.ws Brain need an API key?
Free open-weight models work without one. Paid models require THREE_WS_API_KEY.