Provides capabilities to synchronize Jules-generated code changes and unified diffs directly with local Git repositories.
Allows interaction with GitHub repositories connected to Jules, supporting repository discovery, branch management, and automated pull request creation.
Exposes Google Jules capabilities for automated coding sessions, allowing users to create sessions, manage coding plans, and interact with the Jules AI agent.
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., "@Jules MCP Serverstart a session to fix the authentication bug in my-org/web-app repository"
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.
Jules MCP Server
MCP server that exposes Google Jules capabilities using @google/jules-sdk. This unified implementation uses the SDK plus direct API calls where needed, while keeping SDK-backed caching, snapshots, and artifact handling. MCP tools may use either the SDK or the REST API, whichever is the best fit for the specific operation.
Setup
Install dependencies
Provide
JULES_API_KEYvia environment or~/.jules/config.jsonBuild the server
Run locally:
OpenCode Integration
This repo includes a project-level OpenCode config at .opencode/opencode.json. For global setup, add to ~/.config/opencode/opencode.json (update the command path to where you built this server):
Antigravity Integration
Example OpenCode plugin enablement snippet (merge into your config):
Tools
SDK Tools
Tool | Purpose | Key Params | Returns |
| Create a new Jules session or automated run (supports repoless sessions). |
|
|
| List recent sessions with pagination. |
|
|
| Session dashboard (status, last activity/message, pending plan). |
| Status object with activity/message/plan context |
| Approve plan, send a message, or ask and wait for a reply. |
| Confirmation or agent reply |
| Summarize code changes with file list and metadata. |
| Formatted summary string |
| Get the unified diff for a session or file. |
| Unified diff text |
| Query the local cache using JQL. |
|
|
Query example:
Additional Tools (jules_*)
These tools are part of the same unified server and expose REST-style workflows plus convenience operations. They may use the SDK or the REST API under the hood, depending on which path is required for the operation. They return a structured ToolResult object:
Tool | Purpose | Key Params | Notes |
| List connected repositories. |
| Returns |
| Get details for a connected repository. |
| Accepts |
| Create a session with automation settings. |
| Draft PR falls back to |
| Get session status/details. |
| — |
| List sessions with pagination. |
| — |
| Approve a pending plan. |
| — |
| Reject a plan with feedback. |
| Uses REST endpoint |
| Send a message to a session. |
| — |
| Cancel a running session. |
| Uses REST endpoint |
| List activities in a session. |
| — |
| Get most recent activity. |
| — |
| Get latest plan (if generated). |
| Plan rejection detection uses REST activity listing |
| Wait for completion or timeout. |
| — |
| Wait for plan generation. |
| — |
| Create and optionally wait for completion. |
| Draft PR falls back to |
| Create session with defaults and wait. |
| — |
| Combined session + activity summary. |
| — |
| Apply Jules diff to a local git repo. |
| Refuses dirty trees by default unless |
Hidden Tool (Not Listed in MCP)
Tool | Purpose | Key Params | Notes |
| Get bash command outputs from a session. |
| Not listed in MCP discovery |
Behavior Notes
AUTO_CREATE_DRAFT_PRis not supported by the SDK. When requested forjules_create_sessionorjules_create_and_wait, the server retries withAUTO_CREATE_PR.jules_reject_planandjules_cancel_sessionuse direct REST endpoints when the SDK does not expose public helpers.Plan rejection status depends on a
planRejectedactivity; if the API does not emit it, the status remainspending_approval.jules_sync_local_codebaseapplies patches viagit applyand refuses dirty working trees unlessallowDirty=trueorautoStash=true.
Configuration
The server reads configuration from:
JULES_API_KEYenv var or~/.jules/config.jsonOptional overrides:
JULES_API_BASE_URLJULES_API_TIMEOUTorJULES_REQUEST_TIMEOUT_MSJULES_POLL_INTERVALJULES_RATE_LIMIT_MAX_RETRY_MSJULES_RATE_LIMIT_BASE_DELAY_MSJULES_RATE_LIMIT_MAX_DELAY_MS
CLI
The CLI supports doctor and config commands (like the official SDK MCP):
Credits
Special thanks to David East for building the SDK and API on which this MCP is based.