chatgpt-jules-mcp
Enables interaction with GitHub repositories through Google Jules, supporting session creation, plan approval, and activity retrieval for automated code workflows.
Provides tools to manage Google Jules sessions, including creating, monitoring, and interacting with Jules agents for automated code review and repository management.
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., "@chatgpt-jules-mcp create a session to fix bug in my-org/my-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.
chatgpt-jules-mcp
Secure MCP server allowing ChatGPT to manage Google Jules sessions through OpenAI Secure MCP Tunnel.
Architecture
ChatGPT
-> OpenAI Secure MCP Tunnel
-> tunnel-client (your MacBook)
-> chatgpt-jules-mcp (stdio)
-> jules-agent-sdk
-> Google Jules
-> GitHub repositoryNo public HTTP. No Tailscale Funnel. No raw arbitrary HTTP.
Related MCP server: MCP Shell Server
Security Features
Policy-based access control (
policy.yaml) — allowlist sources, titles, toolsConfirmation gate for
jules.approve_planAudit logging (JSONL) — every tool call recorded with metadata
Secret redaction — JULES_API_KEY, tokens, private keys scrubbed from all output
Rate limiting — per-tool, configurable via policy
Error boundary — all exceptions caught, sanitized, never leak secrets
No generic HTTP tools — only Jules-specific operations
Quick Start
# Install from PyPI
pip install chatgpt-jules-mcp
# Or install in development mode
pip install -e ".[dev]"
# Set credentials
export JULES_API_KEY="your-jules-api-key"
# Configure policy
mkdir -p ~/.config/chatgpt-jules-mcp
cp config/policy.example.yaml ~/.config/chatgpt-jules-mcp/policy.yaml
# Edit: add your sources to allowed_sources
# Run MCP server (module)
python -m chatgpt_jules_mcp
# Or with CLI script (installed via pip)
chatgpt-jules-mcp
# Or with custom config
python -m chatgpt_jules_mcp --config /path/to/policy.yaml
chatgpt-jules-mcp --config /path/to/policy.yamlMCP Tools (14)
Tool | Category | Description |
| Diagnostics | Server status, API key check, policy load |
| Sources | List allowed GitHub sources |
| Sources | Get single source details |
| Sources | Fuzzy search sources (client-side) |
| Sessions | Create Jules session with policy checks |
| Sessions | Get session status |
| Sessions | List sessions (filtered by policy) |
| Sessions | Approve plan (requires confirmation) |
| Sessions | Send follow-up message |
| Sessions | Poll until session completes |
| Activities | List session activities |
| Activities | Get single activity |
| Convenience | Best-effort session summary |
| Convenience | Extract final result from activities |
Project Structure
chatgpt-jules-mcp/
├── src/chatgpt_jules_mcp/
│ ├── server.py # FastMCP server, tool registration
│ ├── policy.py # Policy engine (YAML load, validate, enforce)
│ ├── audit.py # JSONL audit logger
│ ├── redaction.py # Secret pattern redaction
│ ├── errors.py # Custom exceptions, error boundary
│ ├── ratelimit.py # In-memory rate limiter
│ ├── shutdown.py # Graceful shutdown (SIGTERM/SIGINT)
│ ├── tools/
│ │ ├── health.py # jules.health
│ │ ├── sources.py # list_sources, get_source, find_source
│ │ ├── sessions.py # create_session, get_session, list_sessions, approve_plan, send_message, wait_for_completion
│ │ ├── activities.py # list_activities, get_activity
│ │ └── convenience.py # summarize_session, extract_result
├── tests/ # 50 tests across 10 test files
├── config/
│ └── policy.example.yaml # Example policy configuration
├── scripts/
│ └── emergency-stop.sh # Kill switch
└── docs/
└── openai-secure-mcp-tunnel.md # Tunnel setup guideConfiguration
Policy is controlled via ~/.config/chatgpt-jules-mcp/policy.yaml:
jules:
allowed_sources:
- "sources/your-repo"
default_require_plan_approval: true
sessions:
allowed_title_prefixes:
- "ChatGPT:"
max_prompt_chars: 12000
max_message_chars: 8000
tools:
allow:
- "jules.health"
- "jules.list_sources"
# ... see policy.example.yaml for full list
require_confirmation:
- "jules.approve_plan"
audit:
path: "~/.local/share/chatgpt-jules-mcp/audit.jsonl"
redact_secrets: trueTests
pip install pytest pytest-asyncio
PYTHONPATH=src python -m pytest tests/ -v50 tests covering: policy engine, audit logging, redaction, rate limiting, all 13 tools, error handling.
OpenAI Secure MCP Tunnel
See docs/openai-secure-mcp-tunnel.md for full setup.
Quick version:
export CONTROL_PLANE_API_KEY="sk-..."
export CONTROL_PLANE_TUNNEL_ID="tunnel_..."
export JULES_API_KEY="..."
tunnel-client init \
--sample sample_mcp_stdio_local \
--profile chatgpt-jules-mcp-local \
--tunnel-id "$CONTROL_PLANE_TUNNEL_ID" \
--mcp-command "python -m chatgpt_jules_mcp"
tunnel-client doctor --profile chatgpt-jules-mcp-local --explain
tunnel-client run --profile chatgpt-jules-mcp-localEmergency Stop
./scripts/emergency-stop.shLicense
Apache-2.0
Available Tools
14 toolsjules.approve_planD
Inputs: session_id (required). Returns: object
jules.create_sessionD
Inputs: source_id (required), title (required), prompt (required), starting_branch, +1 more. Returns: object
jules.extract_resultD
Inputs: session_id (required). Returns: object
jules.find_sourceD
Inputs: query (required). Returns: object
jules.get_activityD
Inputs: session_id (required), activity_id (required). Returns: object
jules.get_sessionD
Inputs: session_id (required). Returns: object
jules.get_sourceD
Inputs: source_id (required). Returns: object
jules.healthD
Inputs: no named parameters. Returns: object
jules.list_activitiesD
Inputs: session_id (required), page_size. Returns: object
jules.list_sessionsD
Inputs: page_size, filter. Returns: object
jules.list_sourcesD
Inputs: filter, page_size. Returns: object
jules.send_messageD
Inputs: session_id (required), message (required). Returns: object
jules.summarize_sessionD
Inputs: session_id (required). Returns: object
jules.wait_for_completionD
Inputs: session_id (required), poll_interval_sec, timeout_sec. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Tool names are generally distinct with clear actions (get vs list, find vs get) but some pairs like get_activity and list_activities could cause confusion. Without descriptions, an agent might misselect between similar resource-targeting tools.
All tools consistently use snake_case with a verb_noun pattern (e.g., create_session, list_sources). The only exception is health, which is a common standalone name. This pattern aids predictability.
14 tools is well within the ideal 3-15 range for a focused assistant system. Each tool appears to serve a distinct function without redundancy, making the set appropriately scoped.
The surface covers querying and creating sessions, activities, and sources, but lacks update and delete operations for these resources. This leaves gaps that may hinder full lifecycle management.
Related MCP Connectors
Secure and manage MCP servers through the Speakeasy AI Control Plane from your agent.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn 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
- AlicenseBqualityCmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.13158 npm6MIT
- FlicenseNot gradedqualityDmaintenancePrivate OAuth-backed MCP server for ChatGPT, supporting GPT Apps via MCP Streamable HTTP and GPT Actions via REST endpoints with OpenAPI 3.1.-
- AlicenseNot gradedqualityCmaintenanceMCP server enabling AI assistants to securely operate remote servers via persistent SSH sessions, with tools for command execution, file transfer, directory listing, and system monitoring.4MIT