mobilerun-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mobilerun-mcpshow me my current devices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mobilerun-mcp
Public, curated MCP server for the Mobilerun platform, integrated. See
ROADMAP.md for the design (architecture, current state,
and what's planned next).
Layout
packages/tools(@mobilerun/mcp-tools) — auth-agnostic tool core. No hono, no SDK dependency, onlyzod+ MCP SDK types. ExportsbuildMcpServer(ctx, opts?), theBackendinterface, and all 34 tools.packages/server(@mobilerun/mcp-server) — public composition: Bearer auth →@mobilerun/sdkclient →SdkBackend→ToolCtx→buildMcpServer. Ships both an HTTP (Streamable HTTP, stateless) and a stdio transport.
Related MCP server: MCP Iconik
Setup
pnpm install
pnpm run typecheck
bun testRuntime is Bun (bun run, bun test) — pnpm is only the installer.
Running
HTTP (Streamable HTTP, stateless)
cd packages/server
PORT=8080 bun run src/index.tsGET /health— liveness, not auth-gated.POST /mcp— MCP Streamable HTTP endpoint, stateless JSON mode only. Every request opens a freshMcpServer+ transport (no session state, no key caching across requests) and builds a fresh@mobilerun/sdkclient from the request's bearer key.GET /mcp,DELETE /mcp—405. A fresh-server-per-request design has no session/stream state for a GET (SSE) or DELETE (session-terminate) request to act on, so both are explicit405s rather than silently accepted.
Baseline limits (every request, before the request reaches handleMcp)
Request body over
MCP_BODY_LIMIT_BYTES(default 1 MiB) →413.No response within
MCP_REQUEST_TIMEOUT_MS(default 60s) →504.Per-request-IP and per-API-key-hash token-bucket rate limits (
MCP_RATE_LIMIT_PER_IP_PER_MIN/MCP_RATE_LIMIT_PER_KEY_PER_MIN, defaults 120/60 req/min, burst = the limit itself) →429+Retry-After: <seconds>. In-process only (per replica, not distributed) — seepackages/server/src/rate-limit.ts's file header for why. A distributed, weighted limiter (cost per tool, concurrency, org budgets) is a deployment-layer concern this floor doesn't replace.
stdio (local use)
cd packages/server
MOBILERUN_CLOUD_API_KEY=<key> bun run src/stdio.tsAuth
Two ways to present the API key on the HTTP transport, and they must be
disjoint — presenting both is a 400, not "Authorization wins":
Authorization: Bearer <key>(standard MCP client convention)x-mobilerun-cloud-api-key: <key>(matches@mobilerun/sdk's own env var name, for clients that can't set arbitraryAuthorizationheaders)
Bearer channel separation: a dr_sk_-prefixed credential is treated as a
Mobilerun API key. Any other bearer value is rejected with 400 — this
server does not yet validate OAuth 2.1 bearer tokens (see ROADMAP.md for
the plan).
Error taxonomy (packages/server/src/auth.ts):
Condition | Status | Notes |
No credential presented |
|
|
Malformed |
| e.g. not |
Both |
| ambiguous credential, rejected rather than resolved by precedence |
Bearer present but not |
| OAuth 2.1 bearer tokens aren't supported yet |
Body over the size limit |
| see Baseline limits above |
Rate limit exceeded |
|
|
Request exceeds |
|
This server does not yet implement full RFC 9728/OAuth 2.1 validation
(.well-known/oauth-protected-resource itself isn't served yet either) —
only the error shapes the spec requires, ahead of full OAuth support.
The stdio transport takes the key from MOBILERUN_CLOUD_API_KEY in the
process environment (no per-call header, since stdio has no request/response
HTTP envelope) — local-only fallback, not used by the HTTP transport.
Environment (packages/server)
Var | Default | Notes |
|
| HTTP listen port |
|
|
|
|
|
|
|
| Passed straight to the SDK client |
| — | stdio transport only; HTTP always takes the key from the request |
|
|
|
|
| Canonical resource identifier for the |
|
| POST |
|
| Hard per-request timeout around the MCP request handler |
|
| Token-bucket capacity+refill per API-key hash |
|
| Token-bucket capacity+refill per client IP |
|
| Whether to trust |
Validated with zod + safeParse at startup (env.ts) — an invalid config
fails fast (process.exit(1)) rather than serving with a bad default.
Tools (34 total)
Tool | Domain | Notes |
| Devices | |
| Workflows | |
| Workflows | Bundle: |
| Workflows | Bundle: |
| Webhooks | Bundle: |
| Credentials | |
| Credentials | Bundle write path: |
| Tasks |
|
| Device-control | Bundle: |
| Device-control | Bundle: |
| Device-control | Bundle: |
| Device-control | Bundle: |
| Device-control | Bundle: |
| Device-control | Bundle: |
| Platform | Bundle: |
| Platform | Bundle: |
| Platform | Bundle: |
| Platform | Read-only bundle: |
See inline file-header comments in packages/tools/src/tools/*.ts for the
per-tool design notes, and packages/server/src/sdk-backend/workflows.ts
for the two open SDK-mapping gaps (list_credential_packages has no direct
SDK endpoint; create_trigger's scheduleRule.jitter isn't in the public
SDK's typed params). See ROADMAP.md for the consolidated list of tools
that are awaiting SDK support (recordings, deeplink, browser execute-script,
app permissions, eSIM APN/roaming/connectivity, kiosk, location reset,
app_store, apps storage-usage, list_app_events — none of these are
exposed as tools; no SDK support exists for them yet).
Policy / allowlisting (fail-closed at registration)
ToolCtx.policy is required (not optional) and has two levels, both
enforced by packages/tools/src/register.ts's enforcePolicy before any
tool handler ever runs:
Tool-level —
policy.toolAllowlist: ReadonlySet<string>. A tool name outside the set is never usably registered: it's absent fromtools/listand a directtools/callfor it fails with the MCP SDK's own "Tool X not found" error, not a custom "denied" result — there's no handler to run. An emptytoolAllowlisttherefore registers nothing at all. There is no implicit "everything" default; a host that wants full access callsfullAccessPolicy()explicitly.Operation-level —
policy.operationAllowlist?: ReadonlyMap<string, ReadonlySet<string>>, for the bundle tools (webhooks,list_workflow_resources,get_workflow_resource). An entry for a tool name restricts whichoperation/resourcevalues are dispatchable; a value outside the set is rejected with a typed error result before the backend is called. The tool's description also lists the allowed subset when narrowed — the zod input schema itself intentionally stays the full enum (see the comment intools/webhooks.ts/tools/workflows.ts): a policy-narrowed schema would make an out-of-policy value fail generic zod/MCP input validation before reaching the dispatch-time gate, which is where the actual enforcement (and its audit event) lives.
Policy profiles
The HTTP and stdio servers build their Policy via policyForProfile(env.MCP_POLICY_PROFILE)
(packages/tools/src/policies.ts), one of three profiles:
Profile | Tool count | Notes |
| 24 |
|
| 32 | Everything except |
| 34 | Every tool, no operation gates — |
Set MCP_POLICY_PROFILE=readonly|no-commerce|full to choose; both the HTTP
and stdio transports read the same env var, so they stay in lockstep.
buildMcpServer's opts.wrapRegisterTool hook is the composition point for
a host's own registerTool wrapper (e.g. plugging in metrics or its own
tier gate) — see ROADMAP.md for the composition model.
Auth context
ToolCtx.auth: AuthContext is also required — { kind: 'api_key' | 'oauth' | 'machine', subject, ownerId?, clientId?, scopes?, tokenId?, expiresAt? }.
Build it via createAuthContext(...), which enforces that ownerId is
present for kind: 'oauth' | 'machine' (those credentials are always
org-scoped) — optional for kind: 'api_key', where the public API enforces
tenancy itself via key scoping and this resource server never learns the
org. The HTTP/stdio server builds { kind: 'api_key', subject: 'api-key' }.
Typed backend ports & errors
packages/tools/src/backend/{devices,workflows,webhooks,credentials}.ts
(barrel: backend/index.ts) define the Backend ports as minimal DTOs,
not a mirror of @mobilerun/sdk's full response types — only the fields the
tools actually surface. packages/server/src/sdk-backend/ mirrors the same
per-domain split for the SdkBackend implementation over @mobilerun/sdk,
wrapped in withBackendErrors (sdk-backend/errors.ts) so a thrown SDK
error becomes a typed BackendError (code: 'not_found' | 'forbidden' | 'rate_limited' | 'upstream_error' | 'invalid_input') before it reaches the
tool layer. asErrorResult (text-result.ts) renders any BackendError
uniformly as [code] message, regardless of which backend produced it. This
per-domain split is deliberate: a new domain adds
one backend/<domain>.ts + one sdk-backend/<domain>.ts + a one-line barrel
registration in each index.ts, keeping the conflict surface for parallel
domain work small.
Audit telemetry
BuildMcpServerOpts.onToolCall?: (event: ToolCallEvent) => void fires once
per tool call with { toolName, operation?, outcome: 'ok'|'error'|'denied', durationMs, requestId?, auth: {kind, subject, ownerId?, clientId?} } —
never token, call arguments, or secrets. The HTTP/stdio server wires
this to a structured JSON line on stderr (audit-log.ts) — deliberately
never stdout, since the stdio transport reserves stdout exclusively for
JSON-RPC framing (a stray stdout line there corrupts the protocol stream);
this package's log() helper (log.ts) follows the same rule for every log
level, not just warn/error. A host with its own observability stack can swap
the audit sink for a real exporter without touching the core.
Contract & versioning
See packages/tools/CONTRACT.md for the
semver rules (tool rename/removal = major, new tool/optional field/enum
value = minor, description-only = patch) and the deprecation policy.
packages/tools/src/__tests__/schema-snapshot.test.ts snapshots the
full-access tool surface (names + input schemas) so an unintended shape
change fails CI as a snapshot diff.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityBmaintenanceGeneral-purpose MCP server with built-in tools for HTTP, JSON, and datetime operations, supporting pluggable modules and security defaults.
- Flicense-qualityDmaintenanceMCP server providing tools for the Iconik media asset management API. Supports assets, collections, search, metadata, jobs, users, groups, and more with dual transport (SSE and HTTP) and Docker support.
- Alicense-qualityBmaintenanceA standalone MCP server that exposes Rancher-side tools, forwards Authorization headers or uses configured credentials, and supports HTTP and stdio transports.MIT
- Alicense-qualityAmaintenanceMCP server that executes Blueprint workflows (flow.ir) with swarm operations, dispatching agent steps to backends like Lua, Rust, processes, or interactive Operator sessions.1Apache 2.0
Related MCP Connectors
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
MCP server for Appcircle mobile CI/CD platform.
MCP server for interacting with the Supabase platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/droidrun/mobilerun-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server