# three.ws Brain

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 249
- Author: nirholas
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nirholas/three.ws/tree/HEAD/packages/brain-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/threews-brain

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `THREE_WS_BASE`, `THREE_WS_API_KEY`, `THREE_WS_TIMEOUT_MS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values

## When to use it
- 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
- List the available models and show which ones need a key.
- Send this question to `gpt-oss-120b` and return its answer.
- Check model availability before choosing a provider.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [labelhead-artist-momentum](https://affpapa.org/en/nevibecode/mcp/labelhead-artist-momentum.md) — MCP server · ★ 107423
- [Agent Skills Search Server](https://affpapa.org/en/nevibecode/mcp/agent-skills-search-server.md) — MCP server · ★ 26559
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [PraisonAI](https://affpapa.org/en/nevibecode/mcp/praisonai.md) — MCP server · ★ 9289

From the same set: [nirholas/three.ws](https://affpapa.org/en/nevibecode/by/nirholas/three.ws.md) — 43 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
