Android Studio MCP server: add Sume to Gemini's agent

Add a remote MCP server to Gemini in Android Studio: enable MCP Servers, add Sume's httpUrl with an API-key header, and approve its tool calls.

5 min readSume
All posts

To add an MCP server in Android Studio, go to File (Android Studio on macOS) > Settings > Tools > AI > MCP Servers, select Enable MCP Servers, add the server under mcpServers in the configuration field, and click OK. Gemini's agent can then use the server's tools. Android Studio connects over HTTP only: httpUrl for Streamable HTTP, url for SSE, and no stdio servers. For Sume's hosted MCP server, httpUrl is https://mcp.sume.com/mcp, with an Authorization: Bearer header that carries a Sume API key.

Android Studio's side comes from Google's Add an MCP server and Manage agent permissions pages; Sume's side comes from MCP OAuth and API keys, MCP quickstart, MCP tools and gates, and Jobs and results, all read on 2026-09-28. Sume has no official Android Studio integration: the IDE connects to Sume's remote MCP server like any other, and Sume's basics page says hosted MCP still works but is not part of the primary path today. For Gemini CLI, see Gemini CLI MCP server.

What goes in Android Studio's mcp.json?

One sume entry in the shape of Google's example. Android Studio saves the field to an mcp.json file in its configuration directory, and the header value sits in that file, so keep it out of shared or synced settings and rotate the key if it leaks. Sume accepts the key as Authorization: Bearer or x-api-key.

Options from Google's Add an MCP server; Sume values from MCP quickstart and MCP OAuth and API keys, read 2026-09-28.
OptionWhat Google's page saysFor Sume
httpUrlRequired. The full URL of the streamable HTTP endpoint.https://mcp.sume.com/mcp
urlUse instead of httpUrl for an SSE endpoint.Not used: Sume's endpoint is Streamable HTTP
headersCustom HTTP headers for the connection request; default {}.Authorization: Bearer <key>
timeoutConnection timeout in milliseconds; -1, no timeout, is the default.Leave the default
enabledWhether the configuration is active; default true.false switches Sume off without deleting it
{
  "mcpServers": {
    "sume": {
      "httpUrl": "https://mcp.sume.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_SUME_API_KEY>"
      }
    }
  }
}

Can I sign in to Sume with OAuth instead of a key?

You can try it. After you click OK, Android Studio shows either Successfully connected to MCP server... or an error; servers that require authentication return Error connecting to transport: Authorization Exception when authorization fails, and Start Login opens the server's sign-in page in your browser, then retries the connection. Without a header, Sume answers with an OAuth challenge and its protected-resource metadata, and consent happens on Sume's MCP host with Read locked on and Write off by default. A read-only session can't run paid tools such as generate_image; they return insufficient_scope.

Two caveats make the key header the steadier path. Google lists OAuth login with some MCP servers, such as GitHub, among the features Android Studio doesn't support. And in Sume's current code an OAuth access token lasts one hour with no refresh token, so a working sign-in has to be repeated about hourly.

Will Gemini ask before it calls a Sume tool?

Yes, unless you've approved it before. Agent permissions cover interacting with MCP servers: the agent asks when it needs a permission you haven't granted, and you answer Allow for a one-time task or Always allow for trusted, repeated workflows. Google adds that granting a high-level permission automatically authorizes related sub-tools, and its page doesn't say how that groups MCP tools. You can audit grants at File (Android Studio on macOS) > Settings > Tools > AI > Agent Permissions.

Answer Allow, not Always allow, for Sume's paid tools. An API-key session sees Sume's full hosted tool set, and spend lands on the key's workspace. Each paid call needs an idempotency_key, dry_run=true previews admission and cost without submitting the job, and max_spend_usd caps a call only when it is sent. Type /mcp in the chat to list the tools Gemini can use, then ask it to call mcp_health, which confirms the endpoint, auth source, and safety posture.

What are the limits of this setup?

  • No stdio servers, MCP resources, or prompt templates in Android Studio. Sume's server declares only the tools capability in current code, so nothing of Sume's is lost.
  • No local files. Hosted MCP cannot read files from your laptop, and Sume's generation requests take media as public HTTPS URLs, so the agent can't hand Sume an image from your project folder.
  • Tool-call timeouts: Google's page documents only the connection timeout. Sume's jobs_wait holds one call for at most 55 seconds; on wait_slice_expired, the agent should call it again with the same ids, never resubmitting the paid create.
  • GitHub Copilot's plugin, which Android Studio can also run, has a different MCP setup: see IntelliJ GitHub Copilot MCP.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume