jules-mcp
Universal MCP server/CLI for Google Jules Cloud Agent that dispatches, schedules, monitors, unblocks, and merges autonomous coding work across multiple accounts and repositories.
Dispatch, batch, queue, and schedule coding tasks, chore recipes, and GitHub issues to Jules with multi-account load balancing and rolling quota management.
Monitor sessions and events, stream progress, wait for completion, auto-approve plans, reply to stuck questions, and auto-nudge blocked sessions.
Manage GitHub PRs: review, rebase, squash-merge, sync, inspect CI, auto-heal failing checks, and link issues.
Verify and apply session patches locally, run tests, create branches/commits, and consolidate concurrent sessions via 3-way merge.
Store repo memories, setup scripts, environment variables, and commit authorship settings for future Jules runs.
Inspect sources, sessions, activities, plans, bash logs, media artifacts, patches, pool status, queue depth, and active file locks; archive or delete sessions.
Click on "Deploy 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 Consolidate the three completed Jules sessions into one clean PR after running tests."
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 (jules-mcp v2.0.0)
Universal Model Context Protocol (MCP) server, autonomous background scheduler, CI auto-healer, issue dispatcher, and CLI for Google Jules Cloud Agent with 100% native REST API coverage, multi-account pooling, automated load balancing, 24-hour rolling quota ledger, container test runner auto-injection, standardized chore recipes, persistent quota queuing, file collision locks, exponential backoff retries, semantic conflict resolution, preflight conflict dry-runs, and multi-session 3-way consolidation.
Compatible across all major AI coding harnesses: Hermes, Claude Code, Cursor, Codex, and Windsurf.
Complete MCP Tool Reference (53 Native Tools)
1. Autonomous Intelligence, Watchdog & Scheduled Tasks
jules_schedule_task— Set up recurring maintenance tasks (daily, weekly, hourly) that run automatically in the background without manual prompting.jules_list_schedules— List all active and paused recurring scheduled tasks, last run timestamps, and next run countdowns.jules_delete_schedule— Delete or pause a recurring scheduled task by ID.jules_poll_watchdog— Trigger an immediate autonomous watchdog cycle: detects stuck questions, logs real-time events, notifies new PRs, and auto-drains queued tasks into newly opened slots.jules_get_events— Query the rolling cross-harness background event ledger (~/.config/jules/events.json).jules_get_stuck_sessions— One-shot scan across all accounts for stuck sessions, extracting the exact question asked by Jules and ready-to-run unblock commands.jules_auto_nudge_all— Pool-wide autonomous unblocker: broadcasts unblocking directives to all stuck sessions.jules_check_events— Real-time event monitor across accounts: detects stuck tasks, plans awaiting approval, completed PRs, and failures.jules_wait_for_task— Synchronously wait for a session until completion with auto-plan approval and auto-unblocking.jules_dispatch_and_wait— Single-call chore execution: decorates prompt with architectural guardrails, dispatches to least-loaded account, and waits.jules_stream_progress— Generates a structured markdown execution timeline: step-by-step plan checklist[x], internal thought reasoning trail, files modified, and sandbox bash commands.
2. Auto-Healing, Planning Critic & GitHub Integration
jules_heal_ci— Autonomous CI Auto-Healer: inspects failing GitHub Actions checks on a Jules PR, extracts the failure traceback, and dispatches a healing directive back to the Jules session to fix the error and update the PR.jules_plan_critic— Adversarial Planning Critic Agent: analyzes generated multi-step plans for regression risks, missing test verification, and fake mock bypasses before implementation begins.jules_dispatch_issue— GitHub Issue Dispatcher: converts an open GitHub Issue into an autonomous Jules chore, linking the PR back to close the issue automatically.jules_export_workspace— Workspace Exporter (Turndown Tool): exports all connected repos, memories, schedules, setup scripts, authorship, and session history (summaries, activities, and diff patches) to~/jules-export.
3. Repository Memories, Setup Scripts & Authorship Vault
jules_set_repo_memory— Store persistent agentic memories, coding conventions, architectural rules, or constraints for a repository (auto-injected into future sessions).jules_get_repo_memories— Retrieve all persistent agentic memories and custom rules stored for a repository.jules_delete_repo_memory— Delete a stored memory or rule from a repository vault.jules_set_setup_script— Configure a pre-flight container setup script (setup.sh) executed inside the cloud VM before writing code or running tests.jules_configure_authorship— Configure Git commit authorship (co_authored,user_only, orjules_only) so commits attribute to your GitHub account.jules_set_repo_env/jules_get_repo_env/jules_delete_repo_env— Securely store, inspect, and delete environment variables injected into the cloud container sandbox.
4. Local Git & Multi-Session 3-Way Consolidation
jules_consolidate_sessions— Reconcile and merge multiple concurrent Jules sessions on the SAME repository into a single clean local branch or unified PR. Uses 3-way unidiff application and semantic conflict resolution to resolve cloud branch drift automatically, runs tests, and creates 1 clean PR.jules_verify_patch— Dry-run preflight check: inspects a completed session's git patch and runsgit apply --check --3wayagainst a local workspace to verify whether the patch will apply cleanly with 0 conflicts before creating branches or writing files.jules_apply_patch— Fetches clean unidiff patches from completed sessions and applies them directly into a local git repository, creates fix branches, executes test suites (npm test/pytest), and auto-commits.jules_rebase_pr— Rebases an existing Jules PR against latestmainbranch locally and force-pushes with lease.jules_review_pr— Inspects GitHub Pull Requests opened by Jules (diff stats, review comments, CI status checks) viagh.jules_merge_pr— Safely squash-merges verified GitHub PRs and cleans up remote branches.jules_sync_prs— Local PR sync runner: applies patches, verifies locally with tests, and creates GitHub PRs.
5. Multi-Account Pool & Capacity Management
jules_create_task— Dispatches tasks with architectural invariant decoration, container test directives, anti-pause directives, target branches, custom working branch, automated PR creation (AUTO_CREATE_PR), and plan approval mode.jules_batch_dispatch— Launches multiple tasks across repositories simultaneously with multi-account load balancing.jules_pool_status— Live status of all configured Google accounts (quotas, 24h rolling usage ledger, active in-flight count, completed count, next reset minutes).jules_queue_status— Inspect persistent task queue (~/.config/jules/queue.json), queued backlog depth, available pool slots, and countdown to earliest slot reset.jules_drain_queue— Drain and dispatch queued tasks to Google Jules accounts with newly available 24h rolling quota slots.jules_inspect_locks— List active in-flight file locks across repositories to monitor parallel task partitioning and prevent file collisions.jules_queue_tasks— Sequentially executes a pipeline of chores on the same repo (waits for Task N before launching Task N+1).jules_recipe_dispatch— Dispatch a standardized, high-efficiency chore recipe with pre-tested prompt blueprints (scaffold-unit-test,add-strict-types,document-endpoints,clean-dead-code,refactor-isolated-helper).jules_run_suggestions— Scans local repository for security vulnerabilities, missing test coverage, code health issues, and N+1 performance patterns, deduplicating against a 24h ledger and batch-dispatching them.
6. Interactive Feedback, Activities & Lifecycle
jules_list_sources/jules_get_source— Discover connected GitHub repositories and branch metadata.jules_list_sessions/jules_get_session— Inspect session lifecycle and outputs.jules_list_activities/jules_get_activity— Granular chronological activity trails.jules_get_plan/jules_approve_plan— Plan inspection and approval.jules_reply_feedback— Send unblocking feedback directly to active sessions.jules_get_patch— Extract clean git unidiff patches.jules_inspect_bash_logs— Extract terminal shell outputs from Google's cloud sandbox.jules_get_media_artifacts— Extract visual media artifacts generated in the container.jules_archive_session/jules_delete_session— Workspace session management.
Related MCP server: Jules MCP Server
Configuration
Multi-Account Pool (~/.config/jules/keys.json)
{
"accounts": [
{ "name": "Primary", "email": "dev-account-1@example.com", "key": "YOUR_JULES_API_KEY_1" },
{ "name": "Secondary", "email": "dev-account-2@example.com", "key": "YOUR_JULES_API_KEY_2" }
]
}Build & Run
npm run build
npm testAvailable Tools
31 toolsjules_apply_patchA
Fetch the clean git unidiff patch from a completed Jules session and apply it directly to a local repository workspace, with optional branch creation, test execution, and auto-commit using 3-way merge.
Inputs: repo_path (required), session_id (required), auto_commit, branch_name, +1 more.
jules_approve_planA
Approve a multi-step execution plan generated by Jules so it can begin implementing changes.
Inputs: session_id (required).
jules_archive_sessionB
Archive or unarchive a session in Google Jules.
Inputs: session_id (required), unarchive.
jules_auto_nudge_allA
Autonomous unblocker: automatically finds all sessions currently stuck in AWAITING_USER_FEEDBACK across the entire pool and sends a pre-emptive unblocking directive to keep Jules working without manual CLI nudging.
Inputs: custom_instruction.
jules_batch_dispatchB
Dispatch multiple coding tasks across repositories simultaneously, load-balancing automatically across all Google accounts in the pool.
Inputs: tasks (required).
jules_check_eventsA
Real-time event monitor across all Google accounts in the pool: detects sessions that are stuck (asking questions), awaiting plan approval, completed (with PR/patch details), or failed. The primary harness tool for 'Is Jules done? Is Jules stuck?'.
Inputs: include_completed, limit_per_account.
jules_consolidate_sessionsA
Reconcile and merge multiple concurrent Jules sessions on the SAME repository into a single clean local branch or unified PR. Uses 3-way unidiff application to resolve cloud branch drift automatically, runs tests, and creates 1 clean PR without merge conflicts.
Inputs: repo_path (required), pr_title, base_branch, session_ids, +3 more.
jules_create_taskA
Dispatch an asynchronous coding chore to Google Jules. Automatically decorates prompt with system invariants, sandbox test runners, and anti-pause directives.
Inputs: prompt (required), source (required), title, branch, +5 more.
jules_delete_sessionA
Permanently delete a session from Google Jules across accounts.
Inputs: session_id (required).
jules_dispatch_and_waitA
Create a new Jules coding task and immediately block/wait for it in a single MCP tool call. Automatically injects architectural invariants, sandbox test runner commands, and anti-pause directives.
Inputs: prompt (required), source (required), title, branch, +3 more.
jules_get_activityA
Retrieve a single specific activity event payload by its session ID and activity ID.
Inputs: session_id (required), activity_id (required).
jules_get_media_artifactsA
Extract visual media artifacts (screenshots, UI renderings, test failure images) generated by Jules in the sandbox.
Inputs: session_id (required).
jules_get_patchA
Extract the clean git unidiff patch and suggested commit message directly from a completed session.
Inputs: session_id (required).
jules_get_planA
Extract the structured, numbered step-by-step execution plan generated by Jules for a session.
Inputs: session_id (required).
jules_get_sessionA
Retrieve comprehensive details for a specific session ID: status, PR URL, git patch diff, Jules Web URL, failure reason, and activity timeline.
Inputs: session_id (required).
jules_get_sourceA
Get detailed metadata, all available branches, default branch, and privacy status for a specific connected repository.
Inputs: source (required).
jules_inspect_bash_logsA
Extract all terminal shell commands executed inside Google's cloud sandbox, along with exit codes and stdout/stderr output.
Inputs: session_id (required).
jules_list_activitiesA
List and stream the full chronological activity trail for a session (agent thoughts, progress updates, bash outputs, user messages, plan events) with pagination and AIP-160 filters.
Inputs: session_id (required), filter, page_size, page_token.
jules_list_sessionsA
List and filter all coding sessions across all pooled Google accounts by state, repository source, AIP-160 filter, or pagination token.
Inputs: state, filter, source, page_size, +1 more.
jules_list_sourcesA
List all connected GitHub repositories and sources across all configured Google Jules accounts, including branch metadata, pagination, and AIP-160 filter support.
Inputs: filter, page_size, page_token.
jules_merge_prA
Safely squash-merge a verified GitHub PR opened by Google Jules and delete the remote branch via 'gh'.
Inputs: pr_url_or_number (required), repo, merge_method, delete_branch.
jules_pool_statusA
Check the health, rolling 24-hour quota ledger, active vs completed count, and remaining capacity across all Google accounts in the pool.
Inputs: no named parameters.
jules_queue_tasksA
Execute a sequence of chores sequentially on a repository: waits for Task N to complete before launching Task N+1, preventing branch drift and merge conflicts across PRs.
Inputs: tasks (required), source (required), timeout_per_task.
jules_rebase_prA
Rebase an existing Jules GitHub PR against the latest base branch (e.g. main) locally and force-push with lease, eliminating PR collision and out-of-date branch warnings on GitHub.
Inputs: repo_path (required), pr_url_or_number (required), base_branch.
jules_recipe_dispatchC
Dispatch a standardized, high-efficiency chore recipe with pre-tested prompt blueprints (e.g. 'scaffold-unit-test', 'add-strict-types', 'document-endpoints', 'clean-dead-code', 'refactor-isolated-helper'). Eliminates prompt ambiguity and ensures optimal output quality.
Inputs: recipe (required), source (required), target_path (required), auto_create_pr, +2 more.
jules_reply_feedbackA
Send user feedback, unblocking clarification, or follow-up steering instructions directly to an in-progress or paused session.
Inputs: message (required), session_id (required).
jules_review_prA
Inspect and review a GitHub PR opened by Google Jules: pulls PR metadata, review comments, diff stats, and CI status checks via 'gh'.
Inputs: pr_url_or_number (required), repo.
jules_stream_progressA
Extract a structured markdown progress breakdown for a session: step-by-step plan completion checklist [x], thought reasoning trail, files modified, and sandbox commands executed.
Inputs: session_id (required).
jules_sync_prsB
Run local autopilot: extract patches, verify locally with tests, and open GitHub PRs via 'gh'.
Inputs: repo_path, session_id, test_command.
jules_verify_patchA
Dry-run preflight check: inspects a completed session's git patch and runs 'git apply --check --3way' against a local workspace to verify whether the patch will apply cleanly with 0 conflicts before creating branches or writing files.
Inputs: repo_path (required), session_id (required).
jules_wait_for_taskB
Synchronously poll/wait for a Google Jules session until completion, failure, plan approval request, or question asking. Bridges async cloud execution directly into harness dialogue.
Inputs: session_id (required), timeout_seconds, auto_approve_plan, poll_interval_seconds, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Most tools map to distinct resources or lifecycle stages, and the dispatch family is differentiated by concurrency and wait semantics. A few pairs, such as check_events vs wait_for_task and verify_patch vs apply_patch, could cause confusion, but the descriptions are generally clear enough to guide selection.
All tools share the jules_ snake_case prefix and mostly follow a verb_object pattern, with predictable list/get and create/dispatch groupings. Exceptions like recipe_dispatch, batch_dispatch, pool_status, and auto_nudge_all break the strict verb-first convention but remain readable.
At 31 tools, the surface feels heavy and exceeds the typical well-scoped range. Several highly granular tools such as get_activity, get_media_artifacts, and inspect_bash_logs could plausibly be consolidated without losing core functionality, though the broad Jules lifecycle domain does justify some of the count.
The tool set covers the full session lifecycle from dispatch through waiting, monitoring, patching, PR management, archival, and deletion. Notable gaps include no explicit cancel/abort running session and no source creation or connection management, but these are mostly peripheral to the core automation workflow.
Maintenance
Related MCP Connectors
Hosted coding agent: start, follow up on and stop tasks that can open GitHub pull requests.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Task tracking built for coding agents. Work is leased, so two agents never take the same SubTask.
Related MCP Servers
- -licenseAqualityNot gradedmaintenanceEnables automation of Google Jules AI coding assistant through task creation, code review automation, repository management, and AI-powered development workflows. Supports multiple session modes including cloud deployment with persistent authentication.13-
- FlicenseAqualityDmaintenanceEnables LLM applications to interact with Google's Jules AI coding assistant to manage repositories, coding sessions, and pull requests. It allows users to programmatically create tasks, approve plans, and communicate with the assistant during active coding sessions.9-
- AlicenseBqualityNot gradedmaintenanceEnables orchestration of multiple Jules AI workers for tasks like code generation, bug fixing, and review using the Google Jules API. It features git integration, a shared memory system, and real-time activity monitoring for complex, multi-agent development workflows.317 npm4-
- AlicenseNot gradedqualityCmaintenanceMCP server for batch-dispatching coding tasks to Google Jules in parallel, with YAML task definitions, plan approval, and optional LLM-based task planning. Integrates with Claude Code and OpenAI Codex CLI as a tool.54 npm5MIT