Skip to main content
Glama

Jules MCP

A small MCP server for the official Google Jules REST API.

It lets an MCP client (ChatGPT-compatible MCP host, Claude, Cursor, an agent harness, etc.) create and inspect Jules coding sessions without exposing the Jules API key to the model.

The server targets the current Jules v1alpha API and the current MCP Python SDK v2.

What it exposes

Tools:

  • jules_list_sources — list GitHub repositories connected to Jules.

  • jules_get_source — inspect one source and its branches.

  • jules_list_sessions — list Jules sessions.

  • jules_get_session — get current state and outputs for a session.

  • jules_create_session — start a coding task in a connected repository.

  • jules_send_message — send follow-up instructions to an active session.

  • jules_approve_plan — approve a plan when plan approval was requested.

  • jules_list_activities — read immutable session events and artifacts.

  • jules_get_activity — fetch one activity.

  • jules_session_snapshot — get session + latest activities in one MCP call.

  • jules_wait_for_session — bounded polling until the session needs input or finishes.

Destructive session deletion is intentionally not exposed in v0.1.0.

Related MCP server: Jules API MCP

Requirements

  • Python 3.10+

  • A Google Jules account with API access

  • A Jules API key

  • Jules GitHub App installed for repositories you want Jules to work on

Create/copy the API key in Jules settings and keep it secret. The official API authenticates with the x-goog-api-key header.

Install

With uv:

git clone https://github.com/Toligrim/Jules-MCP.git
cd Jules-MCP
uv sync

Or with pip:

pip install -e .

Set the API key in the environment of the MCP server process:

export JULES_API_KEY='your-key-here'

Do not put a real key in this repository, MCP configuration committed to Git, screenshots, logs, or prompts.

Run over stdio

Stdio is the default and is best for a local MCP host:

uv run jules-mcp

Equivalent:

uv run jules-mcp --transport stdio

Example MCP host configuration:

{
  "mcpServers": {
    "jules": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/Jules-MCP", "run", "jules-mcp"],
      "env": {
        "JULES_API_KEY": "${JULES_API_KEY}"
      }
    }
  }
}

Whether ${JULES_API_KEY} expansion is supported depends on the MCP host. Prefer setting the secret in the service/process environment rather than writing it into a config file.

Run over Streamable HTTP

For a local or server deployment:

uv run jules-mcp --transport streamable-http --host 127.0.0.1 --port 8000

The MCP endpoint is:

http://127.0.0.1:8000/mcp

Environment equivalents:

  • JULES_MCP_TRANSPORT=streamable-http

  • JULES_MCP_HOST=127.0.0.1

  • JULES_MCP_PORT=8000

  • JULES_MCP_PATH=/mcp

Security warning for remote deployment

This project deliberately binds Streamable HTTP to 127.0.0.1 by default. Do not expose the raw endpoint directly to the public Internet.

If you place it behind Cloudflare Tunnel, a reverse proxy, or another gateway, add authentication/access control at that layer. The Jules API key remains server-side, but an unauthenticated public MCP endpoint could otherwise let strangers operate your Jules account.

Typical workflow

  1. Call jules_list_sources and choose the repository source.

  2. Call jules_create_session with a prompt and optionally a starting branch.

  3. Use jules_get_session, jules_list_activities, jules_session_snapshot, or jules_wait_for_session to monitor work.

  4. If the session returns AWAITING_PLAN_APPROVAL, call jules_approve_plan.

  5. If it returns AWAITING_USER_FEEDBACK, call jules_send_message with the requested clarification.

  6. Read session outputs for the generated change set / pull request.

Important: the official Jules API documents sendMessage for an active session. A COMPLETED session may reject follow-up messages; this MCP server returns the Jules HTTP/API error instead of hiding it.

Example tool inputs

Create a task:

{
  "prompt": "Add regression tests for the parser and open a PR. Do not merge it.",
  "source": "sources/github/Toligrim/SomeRepo",
  "starting_branch": "main",
  "title": "Parser regression tests",
  "require_plan_approval": false
}

Inspect activities incrementally:

{
  "session_id": "123456789",
  "page_size": 100,
  "create_time": "2026-09-19T12:00:00Z"
}

Error behavior

Jules REST errors are returned to MCP callers in a structured form:

{
  "ok": false,
  "error": {
    "message": "...",
    "status_code": 400,
    "status": "FAILED_PRECONDITION",
    "payload": {}
  }
}

This is useful for cases such as trying to send a follow-up message to a session that is no longer active.

Development

Run client unit tests:

uv run --extra test pytest

The tests use httpx.MockTransport; they do not call the real Jules API and do not require a real API key.

API references

License

MIT

Available Tools

11 tools
jules_approve_planA

Approve the pending plan for a session created with plan approval required.

Inputs: session_id (required). Returns: object

jules_create_sessionA

Create a Jules coding session for a connected GitHub source.

source may be a full resource name such as sources/github/OWNER/REPO or the suffix github/OWNER/REPO. By default Jules auto-approves its plan. Set require_plan_approval=true when a human/model should inspect the plan first.

Inputs: prompt (required), source (required), title, starting_branch, +1 more. Returns: object

jules_get_activityC

Get one activity from a Jules session.

Inputs: session_id (required), activity_id (required). Returns: object

jules_get_sessionA

Get a Jules session by ID or by resource name such as sessions/123.

Inputs: session_id (required). Returns: object

jules_get_sourceA

Get one Jules source, including repository metadata and available branches.

Inputs: source (required). Returns: object

jules_list_activitiesA

List immutable activities/events for a Jules session.

create_time can be an RFC 3339 timestamp to fetch only activities at/after a point in time, which is useful for incremental polling.

Inputs: session_id (required), page_size, page_token, create_time. Returns: object

jules_list_sessionsB

List Jules coding sessions for the authenticated account.

Inputs: page_size, page_token. Returns: object

jules_list_sourcesB

List GitHub repositories/sources connected to the authenticated Jules account.

Inputs: page_size, page_token. Returns: object

jules_send_messageB

Send feedback or additional instructions to an active Jules session.

Inputs: prompt (required), session_id (required). Returns: object

jules_session_snapshotC

Fetch the current session object and the latest page of activities together.

Inputs: session_id (required), activity_page_size. Returns: object

jules_wait_for_sessionA

Poll a Jules session until it stops actively running or until timeout.

Returns when the session reaches COMPLETED, FAILED, PAUSED, AWAITING_PLAN_APPROVAL, or AWAITING_USER_FEEDBACK. This is useful after creating a task when the caller wants a bounded wait instead of manual polling.

Inputs: session_id (required), timeout_seconds, poll_interval_seconds. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 11 tools

    Disambiguation4/5

    Most tools map clearly to distinct resource/action pairs (list/get sources, sessions, activities), and the workflow actions (create, send_message, approve_plan, wait) are unambiguous. The only mild overlap is jules_session_snapshot, which combines get_session and list_activities, and jules_wait_for_session, which could be approximated by polling activities.

    Naming Consistency4/5

    Names consistently use a jules_ prefix with snake_case, mostly following an action_noun pattern (list_sources, get_session, create_session, approve_plan). jules_session_snapshot breaks the verb-first convention, and jules_wait_for_session inserts a preposition, but the overall style remains predictable.

    Tool Count5/5

    Eleven tools is well within the ideal range and matches the server's scope of managing sources, sessions, activities, and approval/waiting workflows. Each tool addresses a distinct need without unnecessary bloat.

    Completeness4/5

    The surface covers listing/retrieving sources and sessions, creating sessions, sending feedback, approving plans, and inspecting activities, which is strong coverage for a coding-agent API. A minor gap is the lack of an explicit cancel/terminate session tool, though agents could work around it via send_message or waiting.

    Related MCP Connectors

    • NotebookLM MCP server for ChatGPT, Claude and any AI agent: list notebooks, create notebook, add source, ask notebook, save note, generate Audio Overview and share notebook in your own NotebookLM account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to NotebookLM yourself; Cotlet does not store your password and you need no NotebookLM API key. About the official NotebookLM API: NotebookLM has an official API only for NotebookLM Enterprise (checked 5 Nov 2026). It is a REST API in v1alpha preview that creates, gets, lists, deletes and shares notebooks, and it needs an Enterprise license and a Google Cloud role. Setup and FAQ: https://cotlet.dev/integrations/notebooklm-api-mcp-server

    • JobDiva MCP server for ChatGPT, Claude and any AI agent: search candidates, find candidate, search jobs, add candidate note, add candidates to hotlist, create submittal and create candidate in your own JobDiva account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to JobDiva yourself; Cotlet does not store your password and you need no JobDiva API key. About the official JobDiva API: JobDiva has a REST API with public Swagger docs, 759 paths across two versions, but it only works with a client ID that JobDiva provides, and JobDiva has no official MCP server (checked 23 Oct 2026). The API has no webhooks, so changes have to be polled, and updates and deletes are POST calls. Setup and FAQ: https://cotlet.dev/integrations/jobdiva-api-mcp-server

      https://cotlet.dev/mcp/v1/jobdiva
    • Clio MCP server for ChatGPT, Claude and any AI agent: search matters, log time entry, create task, add matter note, create calendar entry and list bills in your own Clio account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Clio yourself; Cotlet does not store your password and you need no Clio API key. About the official Clio API: Yes. Clio has a REST API, the Clio Manage API v4, with OAuth 2.0 (checked 6 Nov 2026). Setup and FAQ: https://cotlet.dev/integrations/clio-api-mcp-server

      https://cotlet.dev/mcp/v1/clio
    • Jobber MCP server for ChatGPT, Claude and any AI agent: create quote, convert quote to job, create invoice, send invoice and list unpaid invoices in your own Jobber account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Jobber yourself; Cotlet does not store your password and you need no Jobber API key. About the official Jobber API: Yes, Jobber has a GraphQL API in its Developer Center (checked 14 Oct 2026), but you cannot use it without registering an app. Each Jobber account authorizes your app with OAuth 2.0 and tokens must be refreshed. Setup and FAQ: https://cotlet.dev/integrations/jobber-api-mcp-server

      https://cotlet.dev/mcp/v1/jobber

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      Exposes Google Jules AI capabilities for automated coding tasks, including session management, code reviews, and unified diff handling. It enables users to create sessions, approve plans, and synchronize AI-generated code changes with GitHub repositories.
      26
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables users to manage Google's Jules AI coding agent sessions directly from MCP-compatible clients. It supports creating sessions, approving execution plans, and interacting with session activity to streamline autonomous coding workflows.
      MIT