Skip to content
DocsAll docs
Console

Connectors — MCP

Connect any MCP client to the tools of a desk with kode mcp.

Last updated

On this page

Overview

kode mcp is a stdio MCP server. An MCP client starts it as a program and calls the tools of one desk through it. The server serves every workspace, environment, and workspace tool of the desk. Each tool names its target with workspace or env, as an id. No command, file read, or file write runs on your computer. The client keeps its own local tools.

ArgumentMeaning
teamThe team whose desk to serve. Your own team when absent.
--deskThe desk to serve, by name or id.

Nothing is current. Every call that acts in a desk names it in desk (id, name, or team/name); a call without desk is refused with pass `desk` (id or name); `desk` `list` shows yours. desk list and desk create need no desk.

Tools

The client gets the tools of the desk: the desk, workspace, code, package, image, environment, volume, account, web, and board tools. Every tool, with its arguments and its API route, is in Agent tools. Every tool except desk list and create takes a required desk. The desk tool has the actions list (your desks, each with its environment), create (makes a desk, and connects environment if given; it moves nothing), connect (sets the environment of desk; null disconnects it), start, stop, delete, and ttl.

Add the kode skill to the client too, if the client reads skills. The skill tells the agent which tool does which job. See Skills.

Sign-in and limits

The server uses the login of kode login, saved in ~/.config/kode. It needs no token in the client settings. Every call acts as you, with your rights and limits. A call over a quota gets the same 409 as any other client, and a paused team access gets 403. See Limits.

The server writes stdout for the client only. Its messages for you go to stderr. If the link to the desk drops, the server stays up and connects again after 5 seconds. A call that the dropped link carried returns an error, and the client repeats it.

Remote server

https://dev.kloudlite.io/mcp is the same server on the internet. An app that cannot start a program on your computer (claude.ai, the Claude desktop and mobile apps, ChatGPT) connects to it. The desktop client's CLI can use it too. You sign in with your Kode account on a consent page. You need no laptop and no kode login.

ItemRule
ToolsThe tools of kode mcp, without web_fetch and web_search. The app brings its own web tools. Withholding is a filter on what the app is offered, not a security boundary: exec still runs commands in the workspaces of the desk.
TeamsA connection works in your own team, which is always included because the tools act as you, and in the shared teams that you select on the consent page. You must be an active member of a shared team. The consent page asks for no desk. The app lists and makes desks with the desk tool and its actions list and create, and names the desk in desk on every other call. create takes team to make a desk in another team of the connection. A call for another team is refused. The connection keeps no current desk, so two conversations of one app do not move each other.
Limits120 calls a minute for each connection.
LifetimeA connection lasts 30 days. Then the app asks you to sign in again.
RevokeSettings, Connected apps, Disconnect. The next call of the app is refused.

The connection acts through the desk, with your rights and limits. It holds no credential for /v1. Every call checks each team. A team that you left stops within 30 seconds. A paused team gives a tool error that names the pause.

Tasks

Add the server to an MCP client

Reason for the task

Give an MCP client the tools of a desk.

Job set-up

  • Access: you.
  • Agent tool: none; an agent uses the SDK.
  • Conditions: kode is installed and you are signed in. See Install kode.
  • References: kode mcp.
NOTE

For Claude Code, the plugin adds the server and the skills. See Install the Claude Code plugin.

Procedure

  1. Add the server to the client. For Claude Code, run this command.

    CLI
    claude mcp add kd -- kode mcp
  2. Add this entry to mcpServers for a client with a JSON settings file.

    json
    {  "mcpServers": {    "kd": { "command": "kode", "args": ["mcp"] }  }}
  3. Add this table to ~/.codex/config.toml for Codex.

    toml
    [mcp_servers.kl]command = "kode"args = ["mcp"]
  4. Add the team to the arguments to serve another team, for example ["mcp", "acme"].

  5. Close the client and open it again.

Close-out

  1. Make sure that the client lists the server kd as connected and shows its tools.

Connect a desk to an environment

Reason for the task

Set the environment that a desk reaches.

Job set-up

Procedure

  1. Find the desk by name or id.

    AI agent
    {"tool": "desk", "arguments": {"action": "list"}}
  2. Connect the desk to an environment with environment, by id or name. environment set to null disconnects it.

    AI agent
    {"tool": "desk", "arguments": {"action": "connect", "desk": "dev", "environment": "api"}}

Close-out

  1. Run desk with action set to list. Make sure that the desk shows the environment.

Show the desk

Reason for the task

Find the desk that the tools drive, and its environment.

Job set-up

  • Access: you.
  • Agent tool: desk
  • Conditions: the server kd is connected.
  • References: GET /v1/desks/{id}.

Procedure

  1. Show the desk.

    AI agent
    {"tool": "desk", "arguments": {"action": "list"}}

Close-out

  1. Make sure that the answer names the desk that you expect. If it does not, connect the desk.

Add the connector in claude.ai

Reason for the task

Give claude.ai, and the Claude desktop and mobile apps of the same account, the tools of a desk.

Job set-up

  • Access: you.
  • Agent tool: none; an agent uses the SDK.
  • Conditions: you are signed in to Kode in this browser.
  • References: OAuth endpoints.
NOTE

For a Team or Enterprise plan, an owner adds the connector first: Organization settings, Connectors, Add, Custom, Web. Then each member selects Connect.

Procedure

  1. Open Customize in claude.ai, then Connectors, then Add custom connector.
  2. Enter the name Kode and the URL https://dev.kloudlite.io/mcp.
  3. Keep the sign-in choice "Use Claude's published identity". Select "Register automatically" if the first choice fails.
  4. Select Connect. Select the teams on the consent page, then select Approve.

Close-out

  1. Run desk with action set to list in a chat. Make sure that it lists your desks.
  2. If it says that there is no desk, ask the app to make one with desk and action set to create.

Add the server to the desktop client's CLI

Reason for the task

Give the desktop client's CLI the tools of a desk without a program on your computer.

Job set-up

  • Access: you.
  • Agent tool: none; an agent uses the SDK.
  • Conditions: the CLI is installed and you are signed in to Kode in the browser.
  • References: OAuth endpoints.
NOTE

The consent page says that only a program on this computer can receive this sign-in. That is correct for the CLI.

Procedure

  1. Add the server.

    CLI
    claude mcp add --transport http kl https://dev.kloudlite.io/mcp
  2. Run /mcp in the client, select kd, then sign in.

  3. Select the teams on the consent page in the browser, then select Approve.

Close-out

  1. Run /mcp. Make sure that kd is connected.

Add the server to ChatGPT

Reason for the task

Give ChatGPT the tools of a desk.

Job set-up

  • Access: you.
  • Agent tool: none; an agent uses the SDK.
  • Conditions: your ChatGPT plan offers "Add custom MCP server". This is documented for Business, Enterprise, and Edu plans.
  • References: OAuth endpoints.
NOTE

ChatGPT asks you to confirm every tool that changes something. A tool that only reads runs without a question.

Procedure

  1. Open chatgpt.com/plugins, select +, then Add custom MCP server.
  2. Enter the URL https://dev.kloudlite.io/mcp and select OAuth for the sign-in.
  3. Select Create as a plugin. Sign in on the consent page, select the teams, then select Approve.

Close-out

  1. Run desk with action set to list in a chat. Make sure that it lists your desks.
  2. If it says that there is no desk, ask the app to make one with desk and action set to create.

Revoke a connection

Reason for the task

Stop an app from using your desks.

Job set-up

Procedure

  1. Open Settings, then Connected apps.
  2. Select Disconnect for the app, then confirm.

Close-out

  1. Make sure that the app is gone from the list. The next call of the app asks it to sign in again.

Troubleshooting

SymptomPossible causeCorrective action
not logged in — run `kode login` on stderr, and the server exitsThis computer has no login.Run kode login, then restart the client.
pass `desk` (id or name); `desk` `list` shows yoursA tool was called without desk.Call desk with action set to list, then the tool again with desk set to the name or id.
kode: mcp: …; retrying or …; reconnecting on stderrThe server cannot reach the desk.Wait. The server tries again every 5 seconds. If it repeats, run kode login.
The client lists no server kdThe client does not find kode, or was not restarted.Give the full path of kode in command, then restart the client.
403 with your access to acme is pausedA team admin paused your access.Ask a team admin to unpause it.
409 with a limit name, for example workspaces: 5 of 5 in use; request more under QuotaThe owner has no quota left.Delete an unused item, or see Quota and requests.
The consent page says that the return address is not registeredThe app is not one of the clients that Kode knows, or it sent a return address that is not allowed.Use the choice "Register automatically" in the app. Return addresses are limited to claude.ai, chatgpt.com, and your own computer.
The app shows invalid_targetThe app asked for another resource than https://dev.kloudlite.io/mcp.Enter exactly https://dev.kloudlite.io/mcp as the URL.
A tool answers the desk is starting; call againThe desk of the connection is waking. A wake can take up to a minute.Call the tool again.
429The connection made more than 120 calls in a minute.Wait one minute.
unknown tool: web_fetchThe remote server withholds web_fetch and web_search.Use the web tools of the app.