# Langbot MCP Ops

Operate a LangBot instance through its built-in MCP (Model Context Protocol) server.

- Repository: https://github.com/langbot-app/LangBot (18661 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add langbot-app/LangBot --skill langbot-mcp-ops -g -a claude-code -y`
Codex: `npx skills add langbot-app/LangBot --skill langbot-mcp-ops -g -a codex -y`
Cursor: `npx skills add langbot-app/LangBot --skill langbot-mcp-ops -g -a cursor -y`
Gemini CLI: `npx skills add langbot-app/LangBot --skill langbot-mcp-ops -g -a gemini-cli -y`

## Description

Operate a LangBot instance through its built-in MCP (Model Context Protocol) server. Use when an AI agent needs to manage LangBot, list/create/update/delete bots, agents, pipelines, models, knowledge bases, MCP servers, and skills, over MCP instead of raw HTTP. Covers the /mcp endpoint, API-key auth (web-UI lbk_ keys and the config.yaml global key), the tool surface, and client configuration. Triggers on "langbot mcp", "manage langbot via mcp", "langbot /mcp", "langbot mcp server".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# LangBot MCP Operations

LangBot exposes an **MCP server** so AI agents can manage an instance
programmatically. It mirrors a curated subset of the HTTP service API.

## Endpoint

```
http://<langbot-host>:5300/mcp
```

Transport: **streamable HTTP** (stateless, JSON responses). Same host/port as
the web UI and HTTP API.

## Authentication

Reuses the same API keys as the HTTP API. Send either header:

```
X-API-Key: <api-key>
# or
Authorization: Bearer <api-key>
```

Two kinds of key are accepted:

1. **Web-UI key**, created in the web UI (sidebar → API Keys), prefixed `lbk_`.
   The secret is shown once; only its SHA-256 hash is stored. Each key is bound
   to one Workspace and has explicit scopes, status, optional expiry, and
   last-used metadata. The key determines the Workspace; callers cannot switch
   it with `X-Workspace-Id`.
2. **Global API key**, set in `data/config.yaml` under `api.global_api_key`.
   Requires no login session and no DB record; does not need the `lbk_` prefix.
   It is accepted only by a community instance with exactly one local
   Workspace and is disabled for SaaS multi-Workspace operation. Leave empty to
   disable. See the `langbot-deploy` skill for config details.

Invalid, revoked, or expired keys get `401 Unauthorized`. A valid key whose
scopes do not authorize a tool gets `403 Forbidden`.

To inspect key identity and permissions, call `GET /api/v1/system/context` with the API key.

## Client configuration

```json
{
  "mcpServers": {
    "langbot": {
      "url": "http://<langbot-host>:5300/mcp",
      "headers": { "X-API-Key": "<api-key>" }
    }
  }
}
```

## Tool surface

The rest: https://github.com/langbot-app/LangBot/blob/HEAD/skills/skills/langbot-mcp-ops/SKILL.md
