langbot-app/langbot/langbot-mcp-ops
Claude Code and agent skill by langbot-app/langbot
- community
Checking that the SKILL.md file is still in the repository.
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".
Install
npx vskill@latest install langbot-app/langbot/langbot-mcp-opsSKILL.md
The same SKILL.md was published earlier as langbot-app/langbot/langbot-mcp-ops.
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. Workspace capabilities are being unified under the Application API catalog (pkg/api/application/; see Unified API in the root AGENTS.md); MCP tool names are not necessarily the catalog operation IDs.
Endpoint
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:
Two kinds of key are accepted:
- 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.
- Global API key — set in
data/config.yamlunderapi.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
Plugin permissions
Plugin authorization management uses get_plugin_permissions(author, plugin_name) and revoke_plugin_permissions(author, plugin_name, workspace_operations, capabilities). Revocation replaces grants with a subset; it requires resource.manage. API-key MCP clients cannot confirm/add grants. After installing or upgrading a plugin, direct a member to WebUI to review pending permissions. The marketplace HTTP install option auto_confirm_permissions is used by the setup wizard and remains member-only; setting it with an API key cannot grant permissions. Migration with plugin installation enabled uses the same checks. Pipeline extensions accept allowed_platform_tools as model preferences, not installation grants. See docs/en/plugin/dev/permissions.mdx for HTTP contracts.
Workspace execution environment
Use get_workspace_sandbox(refresh=true) to detect selectable environments and supported limit controls. check_workspace_sandbox(e2b) performs read-only validation and never creates a sandbox. If the E2B service does not expose template queries, it reports the template as unverified; saving is still allowed. set_workspace_sandbox(backend, e2b, limits) requires workspace.update, applies only to new tasks, and never creates a sandbox. Limits may include timeout_sec, idle_ttl_sec, max_sessions, cpus, memory_mb, pids_limit, and workspace_quota_mb; only supported values within deployment ceilings are accepted. Empty limits inherit defaults. Existing tasks retain their Box and limit snapshot. Disk quotas are checked before/after commands, not continuous filesystem quotas.
test_workspace_sandbox(e2b) is a separate, explicit operation that creates, executes in, and deletes a temporary E2B sandbox without saving. It consumes a provider slot and may incur charges. Users supply their provider's template name or ID. Stored API keys are never returned; a blank key retains the prior key only if service URLs are unchanged. Do not modify an E2B service to enable template queries.
Tool surface
create_bot requires bot_data.name and bot_data.adapter as non-empty strings, and bot_data.adapter_config as an object with the adapter's settings. For update_pipeline, fetch the current pipeline before editing: config preserves omitted top-level sections and replaces each supplied section in full, without deep merging. Supplied sections must be objects. The merged configuration is validated before persistence; secret placeholders retain existing values.
Slack quick setup: create a disabled slack-omni bot draft first, then use start_slack_setup with the user's App Configuration access/refresh tokens. Choose socket_mode=true with a browser-reachable OAuth redirect_url, or provide the public HTTPS webhook_url ending in /bots/<bot_uuid>. Poll get_slack_setup_status for the Slack installation authorization URL; the user must authorize installation. On success, apply the returned config using the normal bot update flow. Socket Mode also requires a separately generated app_token (xapp-, scope connections:write). Never log tokens. cancel_slack_setup removes the temporary session without deleting the Slack application. Sessions expire after 15 minutes and are bound to the initiating Workspace, principal, and placement generation. Restarting a failed setup can create another Slack application; inspect the returned app_id first.
The tools wrap the LangBot service layer. Current tools (v1):
create_pipeline and HTTP POST /api/v1/pipelines preserve a supplied config and extensions_preferences; omit config to use installed Runner defaults. Selecting ai.runner.id never grants extension access: an empty plugins list with enable_all_plugins=false still denies that plugin's Tool, EventListener and Command components, while allowing its selected Runner. Editing and copying a pipeline retain these independent settings.
| Tool | Purpose | |
|---|---|---|
get_system_info | Version, edition, instance id | |
list_bots / get_bot / create_bot / update_bot / delete_bot | Manage messaging-platform bots (secrets redacted on read) | |
list_bot_event_route_statuses | Inspect bot event-route runtime status | |
list_processors / get_processor / create_processor / update_processor / delete_processor | Manage the peer Agent, Pipeline and Event processor types | |
get_processor_metadata | Discover installed event-capable Runner components, schemas and supported event patterns. | |
list_processor_runs / get_processor_run_events | Read one Agent or plugin processor run history and logs; paginate with before_id / after_sequence. | |
debug_agent | Execute a synthetic Agent event (processor_uuid, payload); requires runtime.operate. Returns final text and up to 1000 execution events (thinking, text, tool arguments/results). Platform tools use Mock; other configured tools execute normally. Optional payload.mock: errors/results keyed by platform tool name, unsupported_apis lists unavailable platform APIs. | |
list_pipelines / get_pipeline / create_pipeline / update_pipeline / delete_pipeline | Manage pipelines | |
list_llm_models / get_llm_model / list_embedding_models / list_asr_models / list_tts_models / list_model_providers | Inspect models & providers | |
list_knowledge_bases / get_knowledge_base / retrieve_knowledge_base | RAG knowledge bases (incl. semantic search) | |
list_mcp_servers | External MCP servers LangBot connects to (as a client) | |
list_skills / get_skill | Installed skills | |
list_knowledge_engines / get_knowledge_engine_schema / list_knowledge_parsers | Discover RAG configuration | |
get_pipeline_extensions / update_pipeline_extensions | Read or completely replace extension bindings; all lists and switches required | |
run_pipeline | One fresh-session turn; requires runtime.operate, executes configured models/tools, never auto-retry an unknown outcome | |
get_monitoring_records / get_monitoring_details | Bounded Workspace records and existing message/session details | |
get_sandbox_diagnostics | Read status (resource.view), sessions/errors (audit.view); managed sandbox admission still applies |
Mutating tools (create_*, update_*) take a JSON object matching the same shape as the corresponding HTTP API request body. Discover resources with the list_* / get_* tools before mutating; identifiers are UUIDs. Reads require resource.view; mutations require resource.manage. All service calls inherit the immutable Workspace context authenticated at the MCP transport boundary. Pass is_default: true to create_pipeline only when the Workspace does not already have a default pipeline.
How to use
Pipeline plugin extension switches authorize only EventListener, Tool and Command components. Select the Runner independently in AI settings. An empty extension allowlist does not prevent saving, copying or running that Runner. Never enable all plugins or add its plugin to the allowlist as a Runner workaround: that also authorizes its other components. The Runner plugin must still be installed and enabled in the authenticated Workspace, with an available Plugin Runtime.
- Get an API key (web UI key, or set
api.global_api_keyin config.yaml). - Point your MCP client at
http://<host>:5300/mcpwith the key header. - Call
get_system_infoto confirm connectivity. - Use
list_*tools to discover, thenget_*/create_*/update_*/
delete_* as needed.
ChatGPT / Codex subscription providers
list_model_providers can return the openai-codex requester. Its OAuth credentials are server-only and are not provider API keys. Never ask a user to paste ChatGPT access tokens, refresh tokens, or a Codex auth cache into an MCP tool or model configuration.
A human connects or disconnects the subscription through Models → provider settings in the LangBot web UI. The provider-scoped /codex/* authentication routes deliberately require a browser-user session and are not exposed as MCP tools or authorized by a LangBot API key. Once connected, models are managed and selected through the normal provider/model workflow. A disconnected provider must be reauthorized; do not silently replace it with API-key billing.
See ChatGPT / Codex subscription for setup, usage limits, and the personal-account versus shared-service boundary.
Provider deletion
The curated MCP surface currently lists providers but has no provider-deletion tool. In the web UI, Edit Provider → Delete asks for confirmation before removing that provider and all its LLM, embedding, and rerank models. This is irreversible; never interpret a request to edit a provider as authorization to delete it.
The equivalent HTTP operation is DELETE /api/v1/provider/providers/{uuid}?cascade=true, requiring resource.manage in the authenticated Workspace. Omitting cascade preserves the existing refusal to delete providers that still have models. Cloud-managed providers remain protected. Cascade deletion removes stored Codex authorization state as well; it is not the same operation as disconnecting an account.
Implementation & maintenance (for LangBot developers)
- Server:
src/langbot/pkg/api/mcp/server.py(FastMCP). Tools call the service
layer directly, so the MCP surface stays aligned with the API.
- Mount:
src/langbot/pkg/api/mcp/mount.py— an ASGI dispatcher fronting Quart,
authenticating /mcp requests, running the streamable-HTTP session manager.
- Smoke test:
tests/manual/mcp_smoke.py.
When you add, remove, or change an HTTP API endpoint that should beagent-accessible, update the corresponding MCP tool and this skill. TheMCP tool surface and the API must stay aligned (seeAGENTS.md).
Pitfalls
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/skills/langbot-mcp-ops/SKILL.md
Popularity
- Repository stars
- 17,977
- Repository forks
- 1,615
- 7-day trend score
- 49
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/langbot-app/langbot/langbot-mcp-ops)