Jules MCP Server
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 Server create a pull request to update the API documentation in my main repo"
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
A Model Context Protocol (MCP) server for the Google Jules API. This server enables LLM applications to interact with Jules - Google's AI coding assistant - to create sessions, send messages, and manage coding tasks programmatically.
Features
List Sources: Browse available GitHub repositories connected to Jules
Create Sessions: Start new coding tasks with Jules
Send Messages: Communicate with Jules during active sessions
Approve Plans: Approve Jules's proposed plans before execution
List Activities: View the work history and conversation for a session
Create Pull Requests: Convenience tool to create sessions that result in PRs
Related MCP server: Jules MCP Server
Prerequisites
Python 3.10+
A Jules API key (generate one from the Jules Settings page)
GitHub repositories installed in Jules
Installation
Using uv (Recommended)
# Clone the repository
git clone https://github.com/yourusername/jules-mcp.git
cd jules-mcp
# Install dependencies with uv
uv syncUsing pip
# Clone the repository
git clone https://github.com/yourusername/jules-mcp.git
cd jules-mcp
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install fastmcp httpx pydanticConfiguration
Set the JULES_API_KEY environment variable with your API key:
export JULES_API_KEY="your-api-key-here"Usage
Running Standalone
# With uv
uv run python main.py
# With pip/venv
python main.pyMCP Configuration
Add this server to your MCP client configuration. Below are examples for different setups.
Claude Desktop / Claude Code
Add to your mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"jules": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/jules-mcp",
"run",
"python",
"main.py"
],
"env": {
"JULES_API_KEY": "your-jules-api-key"
}
}
}
}Alternative (without uv)
{
"mcpServers": {
"jules": {
"command": "/absolute/path/to/jules-mcp/.venv/bin/python",
"args": [
"/absolute/path/to/jules-mcp/main.py"
],
"env": {
"JULES_API_KEY": "your-jules-api-key"
}
}
}
}Available Tools
list_sources
List available GitHub repositories that Jules can work with.
Parameters:
page_size(int, optional): Number of sources to return (1-100, default 30)page_token(str, optional): Pagination token
get_source
Get details about a specific source repository.
Parameters:
source_name(str, required): Resource name (e.g., "sources/github/owner/repo")
list_sessions
List Jules sessions (coding tasks).
Parameters:
page_size(int, optional): Number of sessions to return (1-100, default 30)page_token(str, optional): Pagination tokenactive_only(bool, optional): Filter to only show active sessions
get_session
Get details about a specific session.
Parameters:
session_name(str, required): Resource name (e.g., "sessions/abc123")
create_session
Create a new Jules session to work on a coding task.
Parameters:
prompt(str, required): The coding task descriptionsource(str, required): Resource name of the repositorybranch(str, optional): Branch to usetitle(str, optional): Session titlerequire_plan_approval(bool, optional): Wait for plan approval before executing
send_message
Send a follow-up message to an active session.
Parameters:
session_name(str, required): Resource name of the sessionmessage(str, required): Message to send
approve_plan
Approve Jules's plan for a session in AWAITING_PLAN_APPROVAL state.
Parameters:
session_name(str, required): Resource name of the session
list_activities
List activities (work history) for a session.
Parameters:
session_name(str, required): Resource name of the sessionpage_size(int, optional): Number of activities to return (1-100, default 50)page_token(str, optional): Pagination token
create_pull_request
Create a session that will result in a pull request.
Parameters:
prompt(str, required): Description of changes to makesource(str, required): Resource name of the repositorybranch(str, optional): Base branch for the PRtitle(str, optional): Title for the session/PR
Session States
Sessions progress through these states:
QUEUED- Session is waiting to startPLANNING- Jules is creating a planAWAITING_PLAN_APPROVAL- Waiting for user to approve the planAWAITING_USER_FEEDBACK- Waiting for user inputIN_PROGRESS- Jules is working on the taskPAUSED- Session is pausedFAILED- Session failedCOMPLETED- Session completed successfully
Example Workflow
List available repositories:
Use the list_sources tool to see which repos are availableCreate a coding task:
Use create_session with: - prompt: "Add a dark mode toggle to the settings page" - source: "sources/github/myorg/myrepo"Monitor progress:
Use get_session to check the session state Use list_activities to see what Jules is doingInteract with Jules:
Use send_message if Jules needs clarification Use approve_plan if plan approval is requiredGet the result:
Once session is COMPLETED, check the outputs field for PR URL
API Reference
This server wraps the Google Jules API (v1alpha).
License
MIT
Available Tools
9 toolsapprove_planA
Approve Jules's plan for a session.
Use this when a session is in AWAITING_PLAN_APPROVAL state and you want Jules to proceed with its proposed plan.
Args: session_name: Resource name of the session (e.g., "sessions/abc123")
Returns: Success confirmation
Inputs: session_name (required). Returns: object
create_pull_requestA
Create a session that will result in a pull request.
This is a convenience wrapper around create_session that instructs Jules to create a PR. The session will automatically create a merge/pull request when the work is complete.
Args: prompt: Description of changes to make (be specific about what you want) source: Resource name of the source repository (e.g., "sources/github/owner/repo") branch: Optional base branch to create PR against (defaults to repository default) title: Optional title for the session/PR
Returns: Created session details - check the 'outputs' field for PR URL once completed
Inputs: prompt (required), source (required), branch, title. Returns: object
create_sessionA
Create a new Jules session to work on a coding task.
Args: prompt: The coding task description for Jules to work on source: Resource name of the source repository (e.g., "sources/github/owner/repo") branch: Optional branch name to use (defaults to repository default branch) title: Optional title for the session (auto-generated if not provided) require_plan_approval: If True, Jules will wait for plan approval before executing
Returns: Created session details including ID, state, and URL to view progress
Inputs: prompt (required), source (required), branch, title, +1 more. Returns: object
get_sessionB
Get details about a specific session.
Args: session_name: Resource name of the session (e.g., "sessions/abc123")
Returns: Session details including state, outputs, and URL
Inputs: session_name (required). Returns: object
get_sourceA
Get details about a specific source repository.
Args: source_name: Resource name of the source (e.g., "sources/github/owner/repo")
Returns: Source details including branches and repository info
Inputs: source_name (required). Returns: object
list_activitiesA
List activities (work history) for a session.
Activities represent individual work units within a session, showing the conversation and actions taken by Jules.
Args: session_name: Resource name of the session (e.g., "sessions/abc123") page_size: Number of activities to return (1-100, default 50) page_token: Token for pagination from previous response
Returns: Dictionary with activities list and optional nextPageToken
Inputs: session_name (required), page_size, page_token. Returns: object
list_sessionsB
List Jules sessions (coding tasks).
Args: page_size: Number of sessions to return (1-100, default 30) page_token: Token for pagination from previous response active_only: If True, filter to only show non-completed/failed sessions
Returns: Dictionary with sessions list and optional nextPageToken
Inputs: page_size, page_token, active_only. Returns: object
list_sourcesA
List available GitHub repositories that Jules can work with.
Args: page_size: Number of sources to return (1-100, default 30) page_token: Token for pagination from previous response
Returns: Dictionary with sources list and optional nextPageToken
Inputs: page_size, page_token. Returns: object
send_messageA
Send a follow-up message to an active Jules session.
Use this to provide additional context, clarify requirements, or respond to Jules when it's waiting for user feedback.
Args: session_name: Resource name of the session (e.g., "sessions/abc123") message: The message to send to Jules
Returns: Success confirmation
Inputs: session_name (required), message (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose with no overlap. For example, create_session creates a general coding task session, create_pull_request specifically creates a PR-focused session, and approve_plan handles plan approval for sessions requiring it. The tools cover different aspects of session management, source handling, and interaction without ambiguity.
All tool names follow a consistent verb_noun pattern using snake_case. The naming is predictable: create_session, get_session, list_sessions, approve_plan, send_message, etc. This consistency makes it easy for agents to understand and predict tool functionality based on naming conventions.
With 9 tools, this server is well-scoped for managing Jules coding sessions and related resources. The tools cover session lifecycle (create, get, list, approve, message), source management (list, get), and activity tracking, which is appropriate for the domain without being overwhelming or insufficient.
The tool set provides comprehensive coverage for core Jules workflows: creating and managing sessions, handling sources, and interacting with active sessions. A minor gap exists in session modification capabilities (e.g., updating session parameters or canceling sessions), but agents can work around this by creating new sessions or using send_message for adjustments.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
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-
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Google's Jules coding agent API for autonomous coding tasks, allowing users to delegate bug fixes, refactoring, testing, and feature development with scheduling capabilities and human-in-the-loop approval workflows.61MIT
- AlicenseBqualityNot gradedmaintenanceExposes 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.26Apache 2.0
- AlicenseAqualityDmaintenanceEnables interaction with Google Jules API to automate software development tasks, such as managing sources, sessions, and activities for AI-powered coding assistance.920 npm6MIT