Skip to main content
Glama
ServerkitOfficial

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

Tools

  • discover_servers - UDP-broadcasts on the LAN, returns any ServerKit phones that answer ({ name, url }[]). Empty result is normal, not an error - the phone-side responder for this doesn't exist yet as of this writing, so expect empty until that ships.

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

  • disconnect() - closes the connection.

  • start_session(pin?), end_session(), run_command(command, cwd?), run_command_sudo(command, cwd?) - forwarded 1:1 to the phone's own tools. 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.

Install

npm install

Register with an agent

claude mcp add --transport stdio serverkit -- node /path/to/serverkit-mcp/src/index.js

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"}

The phone side (Flutter app) doesn't implement the responder yet - this client's discovery will find nothing until it does. connect(url) with a manually-provided URL works today.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYese.g. http://192.168.1.42:8080/mcp

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It usefully discloses the URL formatting requirement and the mandatory pre-session ordering, but says nothing about connection persistence, authentication needs, failure modes, or whether reconnecting replaces an existing connection.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence plus a parenthetical covering URL provenance and formatting; nothing is wasted, though the parenthetical is dense with two distinct ideas that could be split for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter connect tool with no output schema and no annotations, the essential information (what it does, required ordering, URL format and sources) is present. Missing only secondary details like error behavior and connection lifecycle.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already includes an example URL, but the description adds semantic value by explaining what a valid URL is sourced from and how to normalize a raw ip:port into the expected http://<ip>:<port>/mcp form.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('connect'), the exact resource ('ServerKit MCP server'), and the key input ('at the given URL'). It also distinguishes itself from siblings by naming discover_servers as a URL source and implicitly contrasting with disconnect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit ordering rule ('Call this before start_session/run_command') and tells the agent where the URL comes from, either discover_servers or a user-supplied ip:port. This is exactly the when-to-use guidance an agent needs to sequence its calls.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

disconnectB

Disconnect from the current ServerKit server.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure, and it says nothing about side effects: whether an active session is terminated, whether in-flight state is lost, or what happens if no server is connected. For a connection-teardown action with zero annotation coverage, this is a meaningful gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence that is front-loaded and free of waste. It is appropriately sized for a trivial action, though it is also minimally informative rather than optimally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter action with no output schema and no annotations, the description is just barely sufficient. It does not resolve the relationship with the sibling 'end_session' or describe post-disconnect behavior, which leaves the agent guessing in a small but real way.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so per the baseline there is nothing for the description to clarify. No parameter semantics are needed or missing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (disconnect) and resource (the current ServerKit server), which is enough for an agent to know it terminates the active server connection. It contrasts implicitly with the sibling 'connect', but gives no hint of how it differs from 'end_session', leaving that ambiguity unresolved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to call this versus alternatives such as end_session, nor any stated precondition (e.g., that a connection must exist). The agent must infer usage entirely from the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does disclose useful behavior: the return shape ({ name, url }) and the empty-result fallback path (no phone answered, don't retry). It omits things like broadcast duration/timeout or network prerequisites, which would be nice for a local-network probe, but the core behavior is conveyed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and resource, then return shape, then the fallback instruction. No filler; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description appropriately documents the return shape itself and covers the primary failure mode with an actionable fallback. For a zero-parameter discovery tool, an agent has everything needed to call it and handle the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has zero parameters, so there is nothing to document and the baseline of 4 applies. The description correctly implies no inputs are required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (broadcast/discover) and resource (ServerKit phones running the MCP server) on the local network. An agent can distinguish this discovery tool from siblings like connect/disconnect/start_session without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit failure-mode guidance: if the result is empty, ask the user for the ip:port shown in their ServerKit app rather than retrying. It does not explicitly say 'use this before connect', but the context of being the discovery entry point is clear from purpose plus siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

end_sessionB

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It says the session ends but not whether server-side state is destroyed, whether the connection is also closed, whether the call is reversible, or what happens if no session is active.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the action and target are stated immediately and nothing needs trimming.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a trivial zero-parameter tool with no output schema this is close to adequate, but with no annotations at all the description should at least clarify the effect of ending a session relative to the sibling disconnect and whether the connection survives.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline of 4 applies — there is nothing for the description to disambiguate beyond what the empty schema already conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('End') and resource ('the current tool-use session') with scope ('on the connected ServerKit server'), which makes it distinguishable from start_session. It does not, however, distinguish itself from the sibling disconnect, which is the nearest ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no prerequisites stated, and no mention of how this differs from disconnect or when ending a session is preferred over simply disconnecting. The word 'current' implies a session must already exist, but that is inference rather than guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
commandYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It usefully discloses the session prerequisite and the blocked-command policy, but says nothing about blocking vs. async behavior, timeouts, how stdout/stderr are returned, or the destructive potential of running arbitrary shell commands.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, each earning its place: the action, the prerequisite, and the restriction. The primary verb+resource is front-loaded and nothing is repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter command-execution tool with no annotations and no output schema, the definition covers the essential prerequisite and the key restriction, which is enough to call it. It remains incomplete on cwd semantics, execution/output behavior, and timeout or failure handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 2 parameters. The description conveys only the obvious meaning of 'command'; the 'cwd' parameter is never mentioned, leaving its semantics (working directory relative to what base? default value?) undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run a shell command on the server... over SSH'), and the sudo/doas/su/pkexec block immediately distinguishes it from the sibling run_command_sudo. An agent can route between the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the prerequisite ('Requires start_session first') and the negative condition that disqualifies this tool (sudo-invoking commands), which implicitly routes the caller to run_command_sudo. It stops short of naming that sibling or describing what to do if the command is blocked.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
commandYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It helpfully discloses a permission gate and the 'unknown tool' error if disabled. But it omits destructive potential, execution context, authentication nuances beyond the app setting, and response behavior, leaving significant behavioral gaps for a privileged shell command.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no redundancy. The capability is front-loaded, followed by the critical availability condition and error signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-risk sudo shell command tool with no annotations, no output schema, and 0% schema coverage, the description is too sparse. It covers the permission gate but omits the cwd parameter, execution environment, return behavior, and safety considerations, leaving the agent under-informed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for two parameters. The description implies the 'command' parameter semantically but does not explain its format or requirements, and it completely omits the optional 'cwd' parameter, leaving both parameters undocumented beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Run) and resource (shell command) with the distinguishing modifier 'with sudo permitted.' It clearly differentiates from the sibling run_command, which presumably runs without sudo, so an agent can tell the tools apart without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a key precondition—sudo tools must be enabled by the phone owner—and an error signal for when the tool is disabled. However, it does not explicitly state when to choose run_command_sudo over the sibling run_command, nor does it describe scenarios where sudo is or is not appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pinNo

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses the hard gating behavior (commands are inert until this runs) and the challenge-response PIN flow, including the agent's required action. It omits session lifetime, idempotency of repeated calls, and failure behavior when no server is connected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with no filler: purpose first, then the prerequisite constraint, then the conditional retry procedure. Every sentence earns its place and the most important constraint is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, no-output-schema, no-annotation tool, the description covers purpose, ordering semantics, and the conditional PIN path. Remaining gaps (session lifetime, error behavior when disconnected, whether repeated calls are safe) are minor but real.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% for the single 'pin' parameter, so the description must compensate, and it does: it explains that pin is conditionally required, only after the server reports a PIN challenge, and that its value must be obtained from the user. It does not describe the expected format or length of the pin.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (start) and resource (a tool-use session on the connected ServerKit server), and implies a prerequisite relationship to connect via 'connected'. It is clear what the tool does, though it does not explicitly contrast itself with the sibling 'connect' or 'end_session' beyond the ordering hint.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the sequencing rule: it 'must be called once before run_command/run_command_sudo will do anything', which names both the alternatives and the condition that selects this tool. It also specifies the PIN follow-up path, telling the agent to ask the user and re-call with the pin argument.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv0.1.4
    • First observedconnect
    • First observeddisconnect
    • First observeddiscover_servers
    • First observedend_session
    • First observedrun_command
    • First observedrun_command_sudo
    • First observedstart_session

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.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    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.
    840
    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