> For the complete documentation index, see [llms.txt](https://lanbridge.gitbook.io/lanbridge-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lanbridge.gitbook.io/lanbridge-docs/mcp.md).

# MCP

Connect agents to LanBridge over Model Context Protocol.

Two uses:

1. **LanBridge as the model backend** — point any OpenAI-compatible agent at LanBridge.
2. **Hosted LanBridge MCP** — let the agent list models, read docs, check credits, and send test completions from the editor.

**Use as model provider**

Bash

```
export OPENAI_BASE_URL=https://www.lanbridge.net/api/v1
export OPENAI_API_KEY=$LANBRIDGE_API_KEY
export OPENAI_MODEL=openai/gpt-5.6-sol
```

**Hosted MCP URL**

text

```
https://www.lanbridge.net/mcp
```

Bash

```
claude mcp add --transport http lanbridge https://www.lanbridge.net/mcp
codex mcp add lanbridge --url https://www.lanbridge.net/mcp
```

Cursor \~/.cursor/mcp.json:

JSON

```
{
  "mcpServers": {
    "lanbridge": { "url": "https://www.lanbridge.net/mcp" }
  }
}
```

**Tools**

| Tool           | Effect   | Purpose                   |
| -------------- | -------- | ------------------------- |
| list-models    | Read     | Search the live catalog   |
| get-model      | Read     | Full card for one slug    |
| list-providers | Read     | Routing providers         |
| get-credits    | Read     | Balance / spend cap       |
| search-docs    | Read     | Search this documentation |
| send-message   | Billable | Test inference            |
| ping           | Read     | Session health            |

Production traffic should still go to POST /api/v1/chat/completions. Use MCP for editor lookup and quick tests.

**Hint:** mcp.lanbridge.net does not resolve today. If the console publishes a different MCP host, swap only the URL — keep the OpenRouter-style client snippets.

***

Two items to confirm in console before you publish:

* Exact published slugs (homepage names mapped to OpenRouter-style ids above)
* Production MCP host if it is not <https://www.lanbridge.net/mcp>
