MCP server for other AI tools
Let Claude Code, Cursor, VS Code, Claude Desktop and other AI tools use your kaiport connections through a local MCP server – what they can do, what needs your approval, and how to set them up.
kaiport can be an MCP server. AI tools that speak the Model Context Protocol – Claude Code, Cursor, VS Code, Claude Desktop and others – then see your saved connections and can run commands and work with files on your servers. Everything happens inside kaiport: in a terminal tab you can watch, with the credentials kaiport keeps, and with your approval for every change. The AI tools never see a password or key.
Turn the MCP server on
- Open Settings › AI Pilot and scroll to MCP server.
- Turn on Enable MCP server. The line below it shows "Running at http://127.0.0.1:47321/mcp".
- Set up your AI tool with the URL and the token, as described below.
| Setting | What it does |
|---|---|
| Enable MCP server | Starts and stops the server. It listens only on this computer (127.0.0.1). |
| URL | Where the AI tool connects, with a copy button. |
| Token | The secret every request must carry as Authorization: Bearer …. New token replaces it; tools that still use the old one are refused from then on. |
| Port | 47321 unless you choose another one, for example when another program uses it. The URL changes with it. |
| Set up an AI tool | Ready-made setup for Claude Code, Cursor, VS Code and Claude Desktop, with the URL and token filled in. |
If the line under Enable MCP server says the port is used by another program, enter another Port.
Set up your AI tool
Pick your tool under Set up an AI tool, copy the text and use it as described there:
- Claude Code: run the command in a terminal. It is
claude mcp add --transport http kaiport <URL> --header "Authorization: Bearer <token>". - Cursor: add the JSON to
~/.cursor/mcp.json, or to.cursor/mcp.jsonin a project. - VS Code: add the JSON to
.vscode/mcp.jsonin a workspace, or to your user configuration (command MCP: Open User Configuration). - Claude Desktop: add the JSON to
claude_desktop_config.json(Claude › Settings › Developer › Edit Config). Claude Desktop starts local servers as programs, so the setup usesmcp-remotethroughnpx, which needs Node.js. - Other MCP clients – for example OpenAI Codex, Windsurf or Zed: add a remote (Streamable HTTP) server with the URL and the header
Authorization: Bearer <token>, as described in your tool's documentation. A tool that can only start local servers as programs connects throughmcp-remote, as Claude Desktop does.
What AI tools can do
| Tool | What it does | Approval |
|---|---|---|
list_connections | Lists your connections: id, name, type, address, user, group, tags, notes, AI instructions and denied commands. Never passwords, keys or key paths. | runs |
run_command | Runs a command on an SSH connection in its kaiport tab and returns output, exit code and working directory. | depends |
read_screen | Reads the visible screen of that tab, for example while a command waits for input. | runs |
list_dir, read_file, find_files, search_files | List, read, find and search files over SFTP or a storage connection (FTP, S3, WebDAV, Azure). | runs |
write_file, edit_file | Create or change a text file. You see the change as a diff first. | asks |
make_dir, rename, delete | Create folders, rename or move, delete. | asks |
read_file and search_files follow Send file contents to the AI: when it is off, they refuse, as they do for AI Pilot.
Where it runs
The first call for a connection opens a terminal tab for it, in the terminal window you used last, or in a new window if none is open. Later calls use the same tab; if you close it, the next call opens a new one. Such a tab carries a plug symbol, and its AI Pilot panel lists the calls under the tool's name, for example "Claude Code via MCP" – this works even if you haven't set up AI Pilot with a provider of your own.
You can type into the tab at any time, for example a sudo password a command asks for.
Approvals
The MCP server follows the rules of AI Pilot, with one difference: only reading runs without your click, and Autopilot does not apply.
| Step | What happens |
|---|---|
| List connections, read the screen, read, list, find or search files | runs |
| A command that only reads (status, versions, configuration, logs …) | runs |
A command that changes something, uses sudo, or is not known to only read | asks |
| Write or change a file, create, rename or delete | asks, with the diff for file changes |
| Dangerous commands and files that can lock you out | ask, with a warning |
| Commands the connection forbids (Denied commands (AI)) | are refused without asking |
When a call waits for you, kaiport shows its tab; if you are working in another tab of the same window, the tab's plug symbol pulses instead. When kaiport is in the background, a notification appears and the Dock icon bounces (on Windows and Linux the window flashes). Click Run or Deny in the AI Pilot panel. If you deny with a note, the AI tool receives it and can propose something else.
While kaiport is locked, or after kaiport Pro has ended, the tools refuse to run – the list of connections included.
Audit log
Every call ends up in the audit log like AI Pilot's own steps, with the name of the AI tool after the host, for example "via Claude Code". In the file ai-audit.jsonl it is the field client.
Security
- The server only answers on this computer (127.0.0.1) and only with the token. Requests from web pages are refused.
- Anyone who has the token can use your connections within the approval rules above. Keep it out of shared configuration files and repositories; create a New token if it may have leaked.
- What an AI tool reads – command output, file contents, the list of connections – goes to that tool and the AI provider it uses.
- Turn off Enable MCP server when you don't need it.