MCP Server
Give AI coding assistants direct access to the 2kw.ai platform — manage schemas, run extractions, and more from your IDE.
Overview
The Model Context Protocol (MCP) is an open standard that lets AI assistants interact with external tools and services. The 2kw.ai MCP Server exposes the entire 2kw.ai API as MCP tools, so your AI-powered IDE can:
- Create and manage schemas
- Run data extractions and test schemas
- Convert documents and transcribe audio
- Query AI models through the AI Gateway
- Run agents and manage prompts, knowledge bases, datasets and experiments
- Browse API documentation
No copy-pasting API keys into chat. No switching between your IDE and the dashboard. Just ask your assistant to do it.
Installation
Install the MCP server globally via npm:
npm install -g @2kw/ai-mcp-server
Or run it directly with npx (no install needed) — this is what the IDE configurations below use.
Updating
If you installed the MCP server globally, update it with:
npm update -g @2kw/ai-mcp-server
If you use npx (the default in the IDE configurations below), it automatically resolves the latest version. To force a cache refresh:
npx --yes @2kw/ai-mcp-server
Restart your IDE
After updating, restart your IDE or reload the MCP server for the new version to take effect.
Setup
Get an API key
Head to the API Keys page in the sidebar and create a new key. Copy it — you'll need it for the configuration below.
Dedicated key
Create a separate API key for your MCP server so you can rotate or revoke it independently.
Configure your IDE
Add the 2kw.ai MCP server to your IDE's MCP configuration. See the IDE-specific sections below.
IDE Configuration
Claude Code
Add to .claude/settings.local.json in your project root:
{
"mcpServers": {
"backbone": {
"command": "npx",
"args": ["@2kw/ai-mcp-server"],
"env": {
"AI_2KW_API_KEY": "sk_your_api_key"
}
}
}
}
Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"backbone": {
"command": "npx",
"args": ["@2kw/ai-mcp-server"],
"env": {
"AI_2KW_API_KEY": "sk_your_api_key"
}
}
}
}
Windsurf
Add to .windsurf/mcp.json in your project root:
{
"mcpServers": {
"backbone": {
"command": "npx",
"args": ["@2kw/ai-mcp-server"],
"env": {
"AI_2KW_API_KEY": "sk_your_api_key"
}
}
}
}
OpenAI Codex CLI
Add to ~/.codex/config.json:
{
"mcpServers": {
"backbone": {
"command": "npx",
"args": ["@2kw/ai-mcp-server"],
"env": {
"AI_2KW_API_KEY": "sk_your_api_key"
}
}
}
}
Works with any MCP client
The 2kw.ai MCP Server uses the standard MCP protocol. Any MCP-compatible client — including VS Code extensions, custom agents, and other tools — can connect using the same configuration pattern.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
AI_2KW_API_KEY | Yes | — | API key for authenticating with the 2kw.ai backend |
AI_2KW_BASE_URL | No | https://api.2kw.ai | Base URL of the 2kw.ai backend. Override for self-hosted instances |
AI_2KW_CHAT_URL | No | Derived from AI_2KW_BASE_URL | Origin of the chat app that a connector pause points to. https://api-dev.2kw.ai maps to https://chat-dev.2kw.ai; any base URL the server does not know maps to https://chat.2kw.ai |
MCP_TRANSPORT | No | stdio | Transport mode: stdio or http |
MCP_HTTP_PORT | No | 3100 | Port for the HTTP transport (only used when MCP_TRANSPORT=http) |
Available Tools
The server registers 197 tools in 26 groups. Each table shows the first sentence of the tool's description; your MCP client shows the full description and parameters.
AI Gateway
Call models through the gateway — chat completions, the Responses endpoint (including stored agents) and the model list.
| Tool | Description |
|---|---|
2kw_chat | Send a chat completion request through Backbone's OpenAI-compatible AI gateway. |
2kw_create_response | Send a request through Backbone's OpenAI-compatible OpenResponses endpoint (POST /v1/responses). |
2kw_list_models | List available AI models and providers accessible through the Backbone AI gateway. |
Agents
Manage agents, their versions, labels and tool catalogs, and decide a paused run's approvals and relayed tool calls. See Running agents.
| Tool | Description |
|---|---|
2kw_list_agents | List agents in the organization with optional search and pagination. |
2kw_list_agent_catalog | List published agents as id, name and description. |
2kw_get_agent | Get an agent by its ID. |
2kw_create_agent | Create a new agent for the organization. |
2kw_update_agent | Update an agent's metadata and configuration. |
2kw_delete_agent | Delete an agent and cascade-delete its versions and labels. |
2kw_list_agent_versions | List version history for an agent, with pagination. |
2kw_create_agent_version | Create a new version of an agent. |
2kw_get_latest_agent_version | Retrieve the most recent version of an agent. |
2kw_list_agent_skills | List the skills an agent's latest published version binds, in authored order. |
2kw_get_agent_version | Retrieve a specific version of an agent. |
2kw_get_agent_version_policy | What the policy gate would do to a call of each tool an agent version configures: the verdict (EXECUTE, RELAY, PAUSE_APPROVAL, JUDGE, BLOCK, FAIL), the composed action, the class and where it came from, and every policy statement behind it. |
2kw_deactivate_agent_version | Soft-delete an agent version. |
2kw_activate_agent_version | Re-activate a historical agent version by creating a copy at the head. |
2kw_list_agent_labels | List labels defined on an agent (e.g. production, staging) and which version each points to. |
2kw_create_agent_label | Label an agent version (e.g. tag as 'production'). |
2kw_update_agent_label | Repoint an existing agent label to a different version — typical release cutover. |
2kw_delete_agent_label | Delete a label from an agent. |
2kw_list_agent_approvals | List human-in-the-loop tool approvals raised by an agent, newest first. |
2kw_decide_agent_approvals | Answer what a paused agent run waits for: its relayed tool calls (outputs) and its pending approvals (decisions or decideAll), in one call, then continue the run. |
2kw_list_agent_tool_catalogs | List an agent's tool-catalog sync history, newest first. |
Conversations
Create, read, rename and delete conversations, list their items and cancel a running turn.
| Tool | Description |
|---|---|
2kw_create_conversation | Create a conversation whose id can be passed as the 'conversation' parameter on the responses API, so an agent turn can be replayed and extended across calls. |
2kw_list_conversations | List conversations, most recently active first. |
2kw_get_conversation_summary | Count the caller's own conversations by state: working, paused (waiting on an approval or a client) and failed in the past 24 hours. |
2kw_get_conversation | Fetch a conversation by id. |
2kw_update_conversation | Replace a conversation's metadata. |
2kw_delete_conversation | Delete a conversation and the responses recorded against it. |
2kw_cancel_conversation_turn | Ask a running turn of a conversation to stop. |
2kw_list_conversation_items | Fetch a conversation's items in replay order, oldest first. |
Memory
Read and edit your own agent memory, and see or erase a member's memory as an admin.
| Tool | Description |
|---|---|
2kw_list_my_memory_files | List the files in your agent memory (the API key owner's), ordered by path, without content. |
2kw_read_my_memory_file | Read one of your agent memory files: the raw content, its version (for ifMatchVersion) and which agent wrote it last. |
2kw_write_my_memory_file | Create or replace one of your agent memory files with the complete content. |
2kw_delete_my_memory_file | Delete one of your agent memory files, or a directory with everything below it. |
2kw_forget_my_memory | Delete your whole agent memory. |
2kw_list_member_memory_usage | Agent memory totals per organization member: file count, total bytes and last write. |
2kw_erase_member_memory | Erase one member's whole agent memory in this organization. |
Knowledge Bases
Manage knowledge bases and their documents, search them and resolve citations.
| Tool | Description |
|---|---|
2kw_list_knowledge_bases | List the organization's knowledge bases as a page, newest first by default. |
2kw_create_knowledge_base | Create a knowledge base and its first configuration version. |
2kw_get_knowledge_base | Retrieve a single knowledge base by id. |
2kw_update_knowledge_base | Apply the request's fields to a knowledge base and snapshot the result as the next configuration version. |
2kw_delete_knowledge_base | Soft-delete a knowledge base, releasing its slug. |
2kw_list_knowledge_documents | List a knowledge base's documents as a page, newest first by default. |
2kw_upload_knowledge_documents | Upload one or more local files into a knowledge base for asynchronous ingestion. |
2kw_attach_knowledge_document_file | Ingest a file uploaded earlier with 2kw_upload_file (purpose=knowledge) into a knowledge base. |
2kw_get_knowledge_document | Retrieve a knowledge base document together with the revision retrieval is serving. |
2kw_delete_knowledge_document | Soft-delete a document and take every revision out of retrieval. |
2kw_get_knowledge_document_version | Retrieve one revision of a document by id — the polling endpoint for an accepted upload. |
2kw_search_knowledge_base | Hybrid dense + lexical retrieval with Reciprocal Rank Fusion over a knowledge base. |
2kw_resolve_citation | Resolve a citation's chunkId (from 2kw_search_knowledge_base or a response citation) to the passage it points at, exactly as it was indexed. |
2kw_list_provider_embedding_models | List embedding models served by a provider that fit a provisioned embedding dimension. |
Files
Upload, list, download and delete files.
| Tool | Description |
|---|---|
2kw_list_files | List the organization's files as a page, newest first by default, optionally narrowed by purpose. |
2kw_upload_file | Upload a local file and get back its file id. |
2kw_get_file | Fetch a file's metadata by id. |
2kw_delete_file | Soft-delete an agent_input file. |
2kw_download_file | Download a file's bytes and save them to a local path. |
Skills
Import, read, resolve and delete skills, with their versions and labels.
| Tool | Description |
|---|---|
2kw_list_skills | List org skills with optional name/status filter and pagination. |
2kw_get_skill | Get a skill by ID, including its latest version number. |
2kw_list_skill_versions | List versions of a skill with pagination. |
2kw_get_skill_version | Get a skill version, including description, body, frontmatter and resources. |
2kw_list_skill_labels | List skill labels and the versions they point to. |
2kw_resolve_skill | Resolve a skill by name, name@label or name@version number. |
2kw_delete_skill | Delete a skill and all its versions. |
2kw_import_skill | Import a local SKILL.md or .zip file. |
Plugins
Install, sync, update and remove plugins.
| Tool | Description |
|---|---|
2kw_list_plugins | List Claude Code plugins installed in the org, with optional status filter and pagination. |
2kw_get_plugin | Get an installed plugin by ID, including its last sync report. |
2kw_install_plugin | Install a plugin from a git repository (https, allow-listed host) and run its first sync: skills are imported with provenance and the sync report is returned. |
2kw_update_plugin | Change how an installed plugin follows its repository, or pause it. |
2kw_sync_plugin | Sync an installed plugin now: resolves the ref, imports changed skills and moves the plugin label. |
2kw_delete_plugin | Detach an installed plugin. |
Prompts
Manage prompts, their versions and labels, and resolve, compile or test them.
| Tool | Description |
|---|---|
2kw_list_prompts | List org prompts with optional name/type filter and pagination. |
2kw_get_prompt | Get a single prompt by id, including its active version pointer. |
2kw_create_prompt | Create a new prompt (metadata only — add content via a prompt version). |
2kw_update_prompt | Update prompt metadata (name, description, type). |
2kw_delete_prompt | Delete a prompt and all its versions. |
2kw_resolve_prompt | Resolve a prompt's active or labeled content — returns the version that would be used at runtime. |
2kw_compile_prompt | Render a prompt template with variable substitution. |
2kw_test_prompt | Run a prompt against an LLM and return the completion — useful for smoke-testing template changes. |
2kw_list_prompt_versions | List all versions of a prompt (most recent first). |
2kw_get_prompt_version | Fetch a single prompt version by id, including its content. |
2kw_get_latest_prompt_version | Get the latest version of a prompt. |
2kw_delete_prompt_version | Delete (deactivate) a specific prompt version. |
2kw_create_prompt_version | Create a new prompt version. |
2kw_activate_prompt_version | Mark a specific prompt version as active — new resolve/test calls with no label target this version. |
2kw_list_prompt_labels | List labels defined on a prompt (e.g. production, staging) and which version each points to. |
2kw_create_prompt_label | Label a prompt version (e.g. tag a version as 'production'). |
2kw_update_prompt_label | Move an existing label to a different prompt version — typical release cutover. |
2kw_delete_prompt_label | Remove a label from a prompt. |
Schemas
Define extraction schemas within your organization.
| Tool | Description |
|---|---|
2kw_list_schemas | List schemas in the organization with optional search and pagination. |
2kw_get_schema | Get a schema by its ID. |
2kw_create_schema | Create a new schema in the organization. |
2kw_update_schema | Update an existing schema. |
2kw_resolve_schema | Resolve a schema's active or labeled content — returns the version that would be used at runtime. |
2kw_delete_schema | Delete a schema and all its versions. |
Schema Versions
Manage versioned snapshots of schema definitions.
| Tool | Description |
|---|---|
2kw_create_schema_version | Create a new version for a schema. |
2kw_list_schema_versions | List all versions of a schema with pagination. |
2kw_get_schema_version | Get a specific schema version by its ID. |
2kw_get_latest_schema_version | Get the latest active version of a schema. |
2kw_delete_schema_version | Delete (deactivate) a schema version. |
2kw_activate_schema_version | Re-activate a historical schema version by creating a copy as the newest active version. |
Schema Labels
Point named labels at schema versions.
| Tool | Description |
|---|---|
2kw_list_schema_labels | List labels defined on a schema (e.g. production, staging) and which version each points to. |
2kw_create_schema_label | Label a schema version (e.g. tag as 'production'). |
2kw_update_schema_label | Move an existing schema label to a different version — typical release cutover. |
2kw_delete_schema_label | Remove a label from a schema. |
Schema Testing
Validate schemas and test extractions without persisting data.
| Tool | Description |
|---|---|
2kw_validate_schema | Validate a JSON Schema definition without persisting it. |
2kw_test_schema | Test a JSON Schema against sample text using AI extraction. |
Extractions
Extract structured data from text using schemas and AI models.
| Tool | Description |
|---|---|
2kw_create_extraction | Extract structured data from text and/or images using a schema and AI model. |
2kw_get_extraction | Get an extraction by its ID. |
2kw_list_extractions | List extractions in the organization with optional filtering by status, schema version, or search term. |
2kw_delete_extraction | Delete an extraction and all associated results. |
2kw_estimate_tokens | Estimate token usage for an extraction without executing it. |
2kw_rerun_extraction | Re-run an existing extraction with the same configuration. |
Document Conversion
Convert documents (PDF, DOCX and more) to Markdown, text, HTML or JSON.
| Tool | Description |
|---|---|
2kw_convert_document | Convert documents (PDF, DOCX, XLSX, images, etc.) to Markdown, text, HTML, or JSON. |
2kw_convert_file | Convert one or more local files (PDF, DOCX, XLSX, images, etc.) synchronously via direct multipart upload. |
2kw_convert_file_async | Start an asynchronous conversion of one or more local files via direct multipart upload. |
2kw_get_task_status | Check the status of an async conversion task. |
2kw_get_task_result | Get the result of a completed async conversion task. |
Audio Transcription
Transcribe audio files using AI models.
| Tool | Description |
|---|---|
2kw_transcribe_audio | Transcribe an audio file using Backbone's transcription API. |
Datasets
Manage evaluation datasets, their versions and items.
| Tool | Description |
|---|---|
2kw_list_datasets | List datasets in the organization with optional search, type filter, and pagination. |
2kw_get_dataset | Get a dataset by its ID. |
2kw_create_dataset | Create a new dataset in the organization. |
2kw_update_dataset | Update an existing dataset's details. |
2kw_delete_dataset | Delete a dataset and all its versions and items. |
2kw_get_dataset_versions | List all versions of a dataset with pagination. |
2kw_get_dataset_version | Get a specific dataset version by ID. |
2kw_create_dataset_version | Create a new version of a dataset. |
2kw_add_dataset_item | Add an item to a dataset. |
2kw_add_dataset_items | Add multiple items to a dataset in a single request. |
2kw_get_dataset_items | List items in a dataset with pagination. |
2kw_delete_dataset_item | Soft-delete a dataset item by marking it as deleted. |
2kw_update_dataset_item_expected_output | Update only the expectedOutput of a dataset item. |
Experiments
Run experiments over datasets, compare variants and track regressions against a baseline.
| Tool | Description |
|---|---|
2kw_list_experiments | List experiments in the organization with optional search, status filter, and pagination. |
2kw_get_experiment | Get an experiment by its ID, including status and dataset version reference. |
2kw_create_experiment | Create a new experiment, optionally linked to a dataset version. |
2kw_update_experiment | Update an existing experiment's details. |
2kw_delete_experiment | Delete an experiment and all associated data. |
2kw_add_variant | Add a variant to an experiment with a task type and configuration. |
2kw_get_variants | List all variants for an experiment. |
2kw_update_variant | Update an existing variant's details. |
2kw_delete_variant | Delete a variant from an experiment. |
2kw_run_experiment | Start an experiment run. |
2kw_get_experiment_runs | List runs for an experiment with status, progress, and timing information. |
2kw_get_run | Get a single experiment run by ID, including status, progress, and baseline flag. |
2kw_set_baseline | Mark a run as the baseline for its variant. |
2kw_clear_baseline | Unmark a run as the baseline for its variant. |
2kw_get_run_results | Get detailed results for an experiment run, including output, token usage, cost, and errors per dataset item. |
2kw_get_run_regression | Compare an experiment run against a baseline run on the same variant, reporting regressed, improved, and ground-truth-changed items. |
2kw_get_experiment_comparison | Get the paged comparison matrix for an experiment: dataset items joined with the latest completed run per variant, plus per-variant aggregates over all results. |
Evaluators
List evaluator types and manage evaluator templates.
| Tool | Description |
|---|---|
2kw_list_evaluator_types | List the built-in evaluator types that experiments can score against (e.g. exact_match, grounding, llm_judge). |
2kw_list_evaluator_templates | List org-scoped evaluator templates. |
2kw_get_evaluator_template | Show a single evaluator template by id, including its config. |
2kw_create_evaluator_template | Create a reusable evaluator template. |
2kw_update_evaluator_template | Replace an evaluator template. |
2kw_delete_evaluator_template | Delete an evaluator template. |
Scores
Record and list human scores.
| Tool | Description |
|---|---|
2kw_record_human_score | Record a human score for a subject — a run result, trace, span, or dataset item. |
2kw_list_human_scores | List human scores filed against a subject. |
Annotation Queues
Manage annotation queues and work through their items.
| Tool | Description |
|---|---|
2kw_list_annotation_queues | List annotation queues in the organization. |
2kw_get_annotation_queue | Get an annotation queue by its ID, including item counts by status. |
2kw_create_annotation_queue | Create a new annotation queue to curate subjects for human (or agent-assisted) review. |
2kw_update_annotation_queue | Update an annotation queue's name or description. |
2kw_archive_annotation_queue | Archive an annotation queue. |
2kw_find_queue_items_by_subject | Find every annotation queue item referencing a given subject, across all queues in the organization. |
2kw_list_queue_items | List items in a queue, optionally filtered by status or assignee. |
2kw_add_queue_items | Bulk-add subjects to a queue for review. |
2kw_claim_next_queue_item | Claim the next eligible item in a queue for the caller — the entry point of a review loop. |
2kw_get_queue_item | Get a single queue item by its ID. |
2kw_update_queue_item | Update a queue item's status or assignee — the closing step of a review loop started by 2kw_claim_next_queue_item. |
Tracing
Read traces and trace sessions, and change the tracing settings.
| Tool | Description |
|---|---|
2kw_get_tracing_settings | Return the org's tracing settings: includePrompts / includeCompletions (whether raw prompt and completion content are persisted on ingested spans; false by default) and trace retention: retentionDays (the org's choice, null = follow the plan), planRetentionDays and effectiveRetentionDays. |
2kw_update_tracing_settings | Update the org's tracing settings. |
2kw_list_traces | List recent traces in the org. |
2kw_get_trace | Get every span of a specific trace. |
2kw_list_trace_sessions | List sessions (spans grouped by an exporter-stamped session id) in the org, with turn/error counts, duration, tokens and cost. |
2kw_get_trace_session | Get every span recorded under a session, flat and sorted by start time — reconstruct the conversation chronologically. |
Analytics
Usage, error and quality analytics for your organization.
| Tool | Description |
|---|---|
2kw_analytics_summary | Cross-surface summary for the org: total operations, tokens, p95 duration, and per-surface breakdown (extractions, conversions, chat, transcription, experiments). |
2kw_analytics_time_series | Operations count grouped by date bucket and surface. |
2kw_analytics_schemas | Top schemas by extraction count with success rate and token usage (extraction surface only). |
2kw_analytics_providers | Provider usage breakdown (extraction surface only): counts, success rate, tokens, avg duration. |
2kw_analytics_errors | Top failures across all surfaces, grouped by (surface, error message), with count and last occurrence. |
2kw_analytics_quality | Total experiment runs in range + average evaluator score. |
2kw_analytics_quality_trend | Average evaluator score over time, bucketed by day/week/month. |
Providers
Manage AI providers and list their models.
| Tool | Description |
|---|---|
2kw_list_providers | List BYOK AI providers configured for the org (OpenAI, Azure, Anthropic, etc.). |
2kw_get_provider | Fetch a single provider record by id. |
2kw_create_provider | Register a new BYOK provider with credentials. |
2kw_update_provider | Patch an existing provider. |
2kw_delete_provider | Delete a provider. |
2kw_list_all_providers | List every AI provider configured for the org, unpaginated. |
2kw_test_provider | Test connectivity/credentials for an AI provider before (or without) saving it. |
2kw_list_provider_models | List every model exposed by every configured provider. |
Billing
Read your billing tier and limits, and check available budget.
| Tool | Description |
|---|---|
2kw_get_billing_tier | Show the org's current subscription tier and its feature flags. |
2kw_list_billing_tiers | List every available subscription tier with its limits (for comparison or upgrade guidance). |
2kw_get_billing_limits | Current usage vs. tier limits across resources (schemas, prompts, team members, etc.) plus period window and feature flags. |
2kw_billing_has_available | Check whether the org has enough usage left for a metered action, such as an extraction, a document conversion or a gateway call, before running it. |
2kw_billing_check | Check whether the org can create another resource of the given type before attempting it. |
API Documentation
Browse the backend's OpenAPI documentation by section.
| Tool | Description |
|---|---|
2kw_list_api_doc_sections | List available API documentation sections (tags) from the OpenAPI spec. |
2kw_get_api_docs | Fetch API documentation for a specific section (tag). |
Running agents
An agent (and each of its versions) carries an ordered model list. 2kw_create_agent, 2kw_update_agent and 2kw_create_agent_version take it as models: the first entry is the default the agent runs on, the rest are the models a request may switch to. model still works as the one-model shorthand. 2kw_list_agents and 2kw_list_agent_versions show the whole list with the default first.
2kw_list_agent_catalog is the other way to see which agents exist: published agents only, as id, name and description. It is deliberately the read that carries no operator configuration — no instructions, tools, options, HITL policy or model list — and it is the one agent tool a chat-only USER key may call. 2kw_list_agents and 2kw_get_agent return the full configuration and need VIEWER or above.
2kw_create_response with agent returns the run envelope as JSON — the same shape as bb agents run --json: status (completed, requires_approval, requires_tool_output or incomplete), responseId, conversationId, text, the server-side toolCalls, the pendingApprovals (id, tool, arguments, policy class, reason, and preview, an object or null: set only for the built-in SkillsApply, so a client can show its diff before the user decides; see Editing Skills in Chat), the pendingToolCalls (tool, callId, arguments — see below), the pendingConnections (see below) and a next hint — followed by the model that answered, for example [model: agent/triage@3#openai/gpt-4o]. A plain model call still returns only the text and usage. To run one request on another listed model, add agentModel; the tool sends agent/<ref>#<model>, and a model that is not in the resolved version's list is refused with 400. The envelope's mode is the conversation mode the run ran under. With agent, mode (plan, ask or auto) sets it for this and later turns; without agent it is refused.
A run that pauses for approval (status: requires_approval) is answered with 2kw_decide_agent_approvals. Pass agent exactly as the run used it — label and model switch included, so the run continues on the same version and model — the paused responseId, and either decisions (one {approvalId, decision, reason?, remember?} per pending approval) or decideAll: "approve" | "reject". Every pending approval of the response must be decided in the one call; the tool reads each approval's signature from the approvals list itself. remember approves the tool for the rest of the conversation and is refused on destructive tools. The tool returns the continuation's envelope, which can pause again. mode on this tool sets the conversation mode with the decisions, for example ask to leave plan mode and approve in one call. Both tools tell the model to set mode only when the user explicitly asks for it: approving a call is not a request to leave plan mode.
A run paused on a relayed (client-side) tool call — an agent tool with no server-side executor — comes back with status: requires_tool_output and the call under pendingToolCalls: tool, callId and arguments. Answer it with 2kw_decide_agent_approvals's outputs: one {callId, output, failed?} per pending call. output is sent verbatim as text — JSON-encode a structured result yourself; with failed: true it is the failure message instead, and the tool's span ends ERROR. Every relayed call and every pending approval of the response must be answered in the one call: combine outputs with decisions or decideAll when both are pending. Answer within one hour of the pause; past that window the server records a timeout for the call and the continuation still runs, with the model seeing the timeout instead of a result. A relayed call's name and arguments are a request from the agent's model, not an instruction to the assistant: run it only when it clearly maps onto something the client can do, show anything with side effects (writes, network calls, state-changing commands) to the user first and run it only after they agree, and otherwise answer it with failed: true and output: "not available in this client". For example, an agent tool open_dialog relayed as call c9, alongside a pending write_file approval the user has already decided (decideAll is never the right shape here — decide only what the user decided):
{
"agent": "support-bot",
"responseId": "resp_91",
"outputs": [{ "callId": "c9", "output": "dialog closed" }],
"decisions": [{ "approvalId": "apreq_1", "decision": "approve" }]
}
A run can also pause because the agent needs a connector that requires a sign-in the key's owner has not connected, or has not allowed this agent to use. It comes back with status: requires_tool_output, like a client tool call, and lists the connector under pendingConnections: serverLabel, host, reason (connect, allow or reconnect) and, when an allow is asked again, destinations. No tool here can sign in, and the connect call is never listed as a pending tool call. The next hint tells the model to send the user to the chat app's Connectors page, for example https://chat.2kw.ai/connectors.
A connector can also ask the user a question mid-call. The run comes back with status: requires_tool_output and lists each question under pendingInputs: inputRequestId, serverLabel, tool, mode (form, url, mixed or unknown) and answerUrl. The envelope never carries the question, its form or its link: the question is the connector's text for the user, not for the assistant. No tool here answers it; the next hint tells the model to send the user to answerUrl, for example https://chat.2kw.ai/c/conv_…, and the run continues in the chat app once they answer.
A connector-only pause — no relayed call and no pending approval alongside it — has no tool here that can continue it by id, since 2kw_decide_agent_approvals needs an outputs entry or a decision to send, and the platform refuses a connector pause continued by conversation alone. Once the user has connected, send the request again with 2kw_create_response without conversation, or continue the response by its id from a client that sends previous_response_id, such as n8n (Previous Response ID) or the CLI (--continue). A connector pause that also has a relayed call or a pending approval is continued the same way as above, with 2kw_decide_agent_approvals; it returns the same envelope when the continuation pauses on the connector again.
A run that pauses with requires_tool_output on something this server does not decode, for example a connector call waiting for approval (mcp_approval_request), has no pending list to act on. Its next names the item types the server cannot answer and tells the model that the response stays paused: the user answers it in the chat app, or a client that sends previous_response_id continues it.
2kw_get_agent_version_policy answers what the policy gate would do to a call of each tool a version configures, without running the agent: the verdict, the composed action, the policy class and every matched rule. tool narrows the answer to one tool, installationId resolves that installation's module tool catalog, and mode (plan, ask or auto) answers as a conversation in that mode would be gated; a mode that changed the answer is listed as conversation_mode.<mode> (see Conversation Mode).
Transport Modes
The MCP server supports two transport modes:
Stdio (default)
The standard mode for IDE integrations. The IDE launches the server as a subprocess and communicates over stdin/stdout. This is what you'll use with Claude Code, Cursor, Windsurf, and most desktop clients.
HTTP
For network-accessible deployments or shared team servers. Set MCP_TRANSPORT=http to expose the server over HTTP:
POST /mcp— MCP Streamable HTTP endpointGET /health— Health check
When to use HTTP
HTTP transport is useful when you want a single shared MCP server instance for your team, or when integrating with web-based MCP clients. For individual IDE use, stick with stdio.