Google Jules MCP server
Project description
Jules MCP Server (jules-mcp)
An MCP (Model Context Protocol) server that exposes Google Jules Agent operations via FastMCP.
This server lets MCP-compatible clients (and Python code) list Jules sources, create and manage sessions, and inspect activities using the official jules-agent-sdk.
- Server framework: FastMCP
- SDK: jules-agent-sdk
- Python: 3.13+
- License: Apache-2.0
Features
Tools exposed via the MCP server (grouped by area):
- Sources
- get_source(source_id)
- list_sources(filter_str=None, page_size=None, page_token=None)
- get_all_sources(filter_str=None)
- Sessions
- create_session(prompt, source, starting_branch=None, title=None, require_plan_approval=False)
- get_session(session_id)
- list_sessions(page_size=None, page_token=None)
- approve_session_plan(session_id)
- send_session_message(session_id, prompt)
- wait_for_session_completion(session_id, poll_interval=5, timeout=600)
- Activities
- get_activity(session_id, activity_id)
- list_activities(session_id, page_size=None, page_token=None)
- list_all_activities(session_id)
See jules_mcp/jules_mcp.py for signatures and inline docstrings.
Installation
Option A — from a local checkout:
# from the repository root
pip install -e .
Option B — using uv (recommended during development):
# from the repository root
uv sync
The project targets Python 3.13+.
Configuration
Set your Jules API key via environment variable:
- Windows PowerShell
$Env:JULES_API_KEY = "<your_api_key_here>"
- Unix shells (bash/zsh)
export JULES_API_KEY="<your_api_key_here>"
If you do not provide an argument to jules(), the SDK reads JULES_API_KEY automatically.
Running the MCP server
There are two common ways to run the server.
- Programmatic run (in-process) using FastMCP Client — useful for testing or embedding:
import asyncio
from fastmcp import Client
from jules_mcp import mcp
async def main():
async with Client(mcp) as client:
# Example: list all sources (auto-paginated)
result = await client.call_tool("get_all_sources")
print(result)
asyncio.run(main())
- As a standalone MCP server executable for external MCP clients:
-
Using uv and FastMCP directly
uv run fastmcp run jules_mcp/jules_mcp.py:mcp
This starts the MCP server over stdio.
-
Using the provided configuration files
- MCP.json: a sample command configuration for MCP-aware hosts.
- fastmcp.json: FastMCP runtime/environment configuration.
Adjust paths in MCP.json if you use a different checkout location.
You can also run via the module entry point:
python -m jules_mcp
This calls start_mcp() which invokes FastMCP.run() using the "mcp" instance defined in the package.
Usage notes and examples
- Listing and filtering sources
import asyncio
from fastmcp import Client
from jules_mcp import mcp
async def main():
async with Client(mcp) as client:
# Filter syntax follows AIP-160 filtering rules supported by Jules
res = await client.call_tool(
"list_sources",
{"filter_str": "name=sources/source1 OR name=sources/source2", "page_size": 10}
)
print(res)
asyncio.run(main())
- Creating a session and waiting for completion
import asyncio
from fastmcp import Client
from jules_mcp import mcp
async def run_session():
async with Client(mcp) as client:
session = await client.call_tool(
"create_session",
{
"prompt": "Analyze the repository and propose improvements",
"source": "sources/abc123",
"require_plan_approval": True,
},
)
# Optionally approve plan
await client.call_tool("approve_session_plan", {"session_id": session["name"]})
# Wait for completion
final = await client.call_tool(
"wait_for_session_completion",
{"session_id": session["name"], "poll_interval": 5, "timeout": 600}
)
print(final)
asyncio.run(run_session())
- Inspecting activities
import asyncio
from fastmcp import Client
from jules_mcp import mcp
async def list_acts(session_id: str):
async with Client(mcp) as client:
acts = await client.call_tool("list_all_activities", {"session_id": session_id})
for a in acts:
print(a)
asyncio.run(list_acts("sessions/abc123"))
Development
-
Create a virtual environment and install dev dependencies
uv sync # or: pip install -e .[dev]
-
Run tests (note: some tools may reach the Jules API and require JULES_API_KEY)
uv run pytest -q
-
Linting/formatting: follow your preferred tools; this repo does not include linters by default.
Project metadata
- Package name: jules-mcp
- Version: 0.1.0
- Entry points:
- Python module: python -m jules_mcp
- FastMCP source: jules_mcp/jules_mcp.py:mcp
License
Apache License 2.0. See the LICENSE file for details.
Acknowledgements
- FastMCP — https://gofastmcp.com/
- Model Context Protocol — https://modelcontextprotocol.io/
- jules-agent-sdk — unofficial/official SDK used by this server
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jules_mcp-0.1.6.tar.gz.
File metadata
- Download URL: jules_mcp-0.1.6.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
652487e6bbd111ac8bd38ed5fee0e9094d5f3ddc1f8b820bf2ecff1974f62ce6
|
|
| MD5 |
1b812408584d3d37313b4a5819a2d136
|
|
| BLAKE2b-256 |
19b824147aa0593d5c34b216023721ea85eaf14f825526254b27a6733dc0bef0
|
Provenance
The following attestation bundles were made for jules_mcp-0.1.6.tar.gz:
Publisher:
publish.yml on CodeAgentBridge/jules-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jules_mcp-0.1.6.tar.gz -
Subject digest:
652487e6bbd111ac8bd38ed5fee0e9094d5f3ddc1f8b820bf2ecff1974f62ce6 - Sigstore transparency entry: 609797148
- Sigstore integration time:
-
Permalink:
CodeAgentBridge/jules-mcp-server@577978905479f0a2e11712da155baef757663217 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/CodeAgentBridge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@577978905479f0a2e11712da155baef757663217 -
Trigger Event:
release
-
Statement type:
File details
Details for the file jules_mcp-0.1.6-py3-none-any.whl.
File metadata
- Download URL: jules_mcp-0.1.6-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
581c8e4715437c92cdaa891dda533117884a96dd12bf4102cb5489c938472c0b
|
|
| MD5 |
c11c33afca435aa817d74b2bff9df730
|
|
| BLAKE2b-256 |
d8ab296d2e0f859841eee3d8c72e1f4b07cf2375a0805dded43881cc8fa0731b
|
Provenance
The following attestation bundles were made for jules_mcp-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on CodeAgentBridge/jules-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jules_mcp-0.1.6-py3-none-any.whl -
Subject digest:
581c8e4715437c92cdaa891dda533117884a96dd12bf4102cb5489c938472c0b - Sigstore transparency entry: 609797202
- Sigstore integration time:
-
Permalink:
CodeAgentBridge/jules-mcp-server@577978905479f0a2e11712da155baef757663217 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/CodeAgentBridge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@577978905479f0a2e11712da155baef757663217 -
Trigger Event:
release
-
Statement type: