Skip to content

MCP ​

Jugg MCP is a local JSON-RPC service that exposes plugin features to agents. It uses the same underlying features as the CLI. The CLI wraps MCP in a command-line interface and is usually better suited to everyday agent use.

TIP

If you only need an agent to compile, deploy, run tests, or operate a device, install the Jugg CLI Skill first. Use this page only when your client must configure an MCP server directly.

Service information ​

ItemValue
Port range12320..12329
Path/jugg-mcp
ProtocolHTTP + JSON-RPC 2.0
Global toolsversion, list-projects
Non-global toolsAll require projectDir

When multiple Android Studio instances are open, ports increment within the range. A client should discover the port first or use the CLI's port discovery.

Call model ​

The business result returned by an MCP tool is in structuredContent:

json
{
  "status": "OK",
  "message": "...",
  "data": {},
  "artifacts": [],
  "errorCode": null
}

Protocol success does not mean business success. The client must read structuredContent.status and, for compilation and deployment tools, continue reading fields such as isCompileSuccess and isDeploySuccess.

Public tools ​

CategoryTools
Projects and versionversion, list-projects
Build and deploymentcompile, deploy, gradle-build, clean-reinstall, get-compile-status
Testinginstrument
Runtimerestart, wait-logs, activity-stack
Devicesdevices
UIlayout-dump, view-locate, view-inspect, tap
Remote diagnosticsssh-info
Statusstatus

layout-verify and figma-layout-verify are not currently public tools unless they are registered in the public tool list later.

Asynchronous compilation ​

compile, deploy, gradle-build, and instrument may return a running state:

text
compile/deploy/gradle-build/instrument
  -> Return jobId
  -> Call get-compile-status(projectDir, jobId)
  -> Continue until success / failed / canceled

The CLI includes polling. When using MCP directly, poll get-compile-status yourself. You can also pass waitTimeoutMs to reduce empty polling.

Why the CLI is usually preferred ​

Compared with configuring MCP directly, the CLI offers these advantages:

  • The CLI is packaged with the skill, making correct instructions easier for an agent to obtain.
  • The CLI can combine commands, scripts, and pipelines, which suits continuous terminal and agent workflows.
  • The CLI includes asynchronous polling and heartbeats, reducing agent-side polling overhead.
  • CLI output modes support people, agents, and scripts.
  • When both CLI and MCP are available, agent instructions should define one preferred entry point to avoid mixing both interfaces in the same task.

When to use MCP directly ​

MCP is suitable when:

  • Your platform can configure only MCP servers.
  • You need to manage every tool through one MCP client.
  • You need to read the MCP tools/list schema directly.

In other situations, prefer the CLI:

  • Normal terminal use.
  • Compilation verification by an agent after code changes.
  • Long-running tasks that require frequent polling when the client has no effective waiting mechanism.