Skip to main content
Glama
serverkit-mcp

serverkit-mcp

serverkit-mcp

Stdio MCP server that proxies a ServerKit phone's in-app MCP server (SSH command execution) to any MCP-capable agent - Claude Code, Codex, or anything else that can run a local MCP server over stdio.

Why this exists

The phone's own MCP server is Streamable HTTP, reachable at http://<phone-ip>:<port>/mcp. That's fine for a client that supports remote HTTP connectors directly (Claude Desktop, claude.ai), but a CLI agent normally needs that URL registered up front, and the phone's IP/port isn't stable across sessions. This package sits in between as a stdio MCP server: it can broadcast on the LAN to find the phone automatically, or take a URL you give it, then forwards tool calls to it for the rest of the conversation - no config file edit each time.

Related MCP server: idh

Get the ServerKit app

This package is only useful if the phone side exists: ServerKit is the Android app that turns a phone into an SSH & microservice manager for Ubuntu servers, and runs the MCP server this package connects to. Install it, enable its MCP server, then point an agent at it with the tools below.

Tools

  • start_here - the onboarding/guide tool. Agents are told (via the server's instructions) to call this first. It explains what ServerKit is, the production-safety rules, how to connect/select a server, run commands, handle disconnects, reconnect, and update this proxy, and it reports the connected app's version plus a compatibility verdict. Works with or without a connection.

  • serverkit_mcp_version - reports this proxy's installed version, the latest on npm, the update command (when outdated), and the connected app's version + compatibility. Local-only, no phone connection needed.

  • discover_servers - UDP-broadcasts on the LAN, returns any ServerKit phones that answer ({ name, url }[]).

  • connect(url) - connects to a phone's MCP server (from discovery, or an ip:port the user gives you directly).

  • disconnect() - closes the connection.

  • request_pairing_code(), start_session(pairing_code), end_session(), run_command(command, cwd?), run_command_sudo(command, cwd?), cancel_command() - forwarded 1:1 to the phone's own tools. The phone mints a pairing code and shows it in the app automatically the moment a client connects; request_pairing_code re-mints when it expires. The code is shown only in the app - ask the user to read it out. See ssh_server_manager/lib/features/mcp_server/data/mcp_tools.dart in the main app repo for what these actually do server-side; keep this file's tool list in sync with that one.

  • list_servers(), add_server(name, host, port, username, os, version, password?, private_key?, key_passphrase?), connect_server(server_id, password?) - "management mode": bootstrap a fresh ServerKit install (save a server, then connect to it) without the phone owner touching the Servers tab first. Also 1:1 forwards, also require start_session first. See ssh_server_manager/lib/features/mcp_server/data/mcp_management_tools.dart.

  • list_database_connections(), add_database_connection(name, engine, host, port, username, database, password, ssl?), update_database_connection(connection_id, ...), remove_database_connection(connection_id), connect_database(connection_id) - RDBMS connection management, also 1:1 forwards, also require start_session first.

  • run_ddl_sql(sql), run_dml_sql(sql), run_control_sql(sql) - execute SQL on the connection opened by connect_database. The phone classifies the leading keyword and refuses a statement belonging to a different tool. run_ddl_sql is destructive (DROP/TRUNCATE) - confirm with the user first. See ssh_server_manager/lib/features/mcp_server/data/mcp_rdbms_tools.dart.

  • download_file(remote_path, local_path), upload_file(local_path, remote_path) - desktop-side only, not forwarded to the phone. Only this Node process has real desktop filesystem access, so the actual byte-moving happens here, against the phone's raw /mcp/file route. The agent's tool result is a byte count, never the file content.

Install

npx -y serverkit-mcp@latest

No install step needed - npx fetches and runs the published package. For local development against this repo instead, clone it and run npm install.

Update

The proxy gains tools over time; an outdated copy silently lacks tools the phone already exposes. Always register with the @latest tag so npx re-resolves on each launch:

claude mcp remove serverkit && claude mcp add --transport stdio serverkit -- npx -y serverkit-mcp@latest

Or, if installed globally, npm i -g serverkit-mcp@latest. An agent can check this for you via the serverkit_mcp_version tool and run the update itself.

Compatibility

The phone advertises its app version (name+build, e.g. 2.5.2+118) in the MCP handshake. This proxy declares the oldest app build it supports in package.json:

"serverkit": { "minAppVersionCode": 118 }

start_here and serverkit_mcp_version compare the two and report appCompatible. When it is false, the agent tells the user to update the ServerKit app. Bump minAppVersionCode whenever the proxy starts relying on a newer phone-side tool or field.

Register with an agent

claude mcp add --transport stdio serverkit -- npx -y serverkit-mcp@latest

This is a one-time setup step (unlike the phone's raw-HTTP prompt, which has no persistent registration). After that, in any session: ask the agent to discover or connect, then use the SSH tools normally.

Discovery protocol

Self-defined, no external dependency. UDP port 41234.

  • Request (broadcast to 255.255.255.255:41234): {"type":"serverkit-discover","v":1}

  • Response (unicast back to sender): {"type":"serverkit-announce","v":1,"name":"<device>","url":"http://<ip>:<port>/mcp"}

Available Tools

7 tools
connectA

Connect to a ServerKit MCP server at the given URL (e.g. from discover_servers, or an ip:port the user gave you - format it as http://:/mcp). Call this before start_session/run_command.

Inputs: url (required).

disconnectB

Disconnect from the current ServerKit server.

Inputs: no named parameters.

discover_serversA

Broadcast on the local network to find ServerKit phones running the MCP server. Returns a list of { name, url }. If it comes back empty, no phone answered - ask the user for the ip:port shown in their ServerKit app instead of retrying.

Inputs: no named parameters.

end_sessionB

End the current tool-use session on the connected ServerKit server.

Inputs: no named parameters.

run_commandA

Run a shell command on the server ServerKit is connected to over SSH. Requires start_session first. Blocked if the command invokes sudo/doas/su/pkexec.

Inputs: command (required), cwd.

run_command_sudoA

Run a shell command with sudo permitted. Only works if the phone owner enabled sudo tools in the app - if it errors as unknown, that tool is disabled there.

Inputs: command (required), cwd.

start_sessionA

Start a tool-use session on the connected ServerKit server. Must be called once before run_command/run_command_sudo will do anything. If the server replies that a PIN is required, ask the user for it and call this again with the pin argument.

Inputs: pin.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool maps to a distinct stage in a clear lifecycle: discovery, connection, session, and command execution. The only near-overlap is run_command vs run_command_sudo, but the sudo distinction is spelled out explicitly in both descriptions. An agent can easily pick the right tool at each step.

    Naming Consistency4/5

    Almost everything follows a consistent snake_case verb_noun pattern (discover_servers, start_session, end_session, run_command, run_command_sudo). The only minor deviations are the bare connect/disconnect pair, which are still predictable and readable, plus the _sudo suffix variant.

    Tool Count5/5

    Seven tools is well-scoped for a remote-command bridge: discovery, connection management, session management, and command execution. Every tool earns its place with no redundant or filler entries.

    Completeness4/5

    The connection-to-command lifecycle is fully covered (discover, connect, start/end session, run, run with sudo). Minor gaps exist around introspection such as checking connection/session status or transferring files, but core workflows have no dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects local tools (browser, shell) to a remote MCP server via reverse-MCP, enabling the server agent to control your local browser and execute shell commands.
      385 npm
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to discover and interact with iOS apps through a local MCP gateway, converting remote Streamable HTTP MCP endpoints into stdio tools. Provides dynamic device discovery, tool schema introspection, and deterministic tool calling for app analysis.
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to connect to remote MCP servers once, access their tools through a compact MCP endpoint, pair a CLI inside sandboxes, and create watches that turn command or tool output into pollable structured events.
      2
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.
      MIT