Skip to main content
Glama

Jules MCP Server

Model Context Protocol (MCP) server for Google's Jules AI coding agent. Enables AI assistants like Claude to create and manage asynchronous coding tasks through the Jules API.

Overview

Jules is Google's AI coding agent that executes development tasks in isolated cloud VMs. This MCP server exposes Jules functionality through 8 standardized tools that AI assistants can discover and invoke automatically.

What Jules can do:

  • Generate code from natural language descriptions

  • Fix bugs including race conditions and logic errors

  • Create comprehensive test suites with mocking

  • Update dependencies and handle breaking changes

  • Refactor code across multiple files

  • Search documentation and perform code reviews

Tasks run asynchronously and typically complete in 5-60 minutes depending on complexity.

Related MCP server: Jules MCP Server

Prerequisites

  1. Google Account with Jules access

  2. Jules API Key - Get from https://jules.google.com/settings#api (up to 3 keys allowed)

  3. GitHub Integration - Install Jules GitHub app at https://jules.google.com to connect repositories

  4. Node.js 18+ installed on your system

Quick Start

1. Installation

cd jules-mcp-server
npm install
npm run build

2. Configure API Key

Create a .env file (never commit this):

cp .env.example .env
# Edit .env and add your Jules API key

Or pass the key directly in Claude Desktop config (recommended - see below).

3. Configure Claude Desktop

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "jules": {
      "command": "node",
      "args": ["/absolute/path/to/jules-mcp-server/build/index.js"],
      "env": {
        "JULES_API_KEY": "your_actual_jules_api_key_here"
      }
    }
  }
}

Important:

  • Use the absolute path to build/index.js (not relative)

  • Replace your_actual_jules_api_key_here with your real API key

  • Restart Claude Desktop completely after making changes

4. Verify Installation

  1. Restart Claude Desktop

  2. Look for the šŸ”Œ icon in the Claude interface

  3. You should see "jules" server with 8 tools available

  4. Try asking Claude: "List my Jules repositories"

Available Tools

1. jules_list_sources

List all GitHub repositories connected to Jules.

Example prompt: "Show me my Jules repositories"

2. jules_create_session

Start a new asynchronous coding task.

Parameters:

  • repoOwner - GitHub repository owner/org

  • repoName - Repository name

  • prompt - Detailed task description

  • branch - Starting branch (default: "main")

  • autoApprove - Auto-approve plan (default: true)

  • autoCreatePR - Auto-create PR when done (default: false)

Example prompt: "Create a Jules session for myorg/myrepo to add unit tests for the authentication module"

3. jules_list_sessions

List all your Jules sessions with their states.

Example prompt: "Show all my Jules sessions"

4. jules_get_status

Check session status and recent activity. Use this to poll for completion.

Example prompt: "Check status of Jules session abc123"

5. jules_send_message

Send a follow-up message to a running session.

Example prompt: "Tell Jules session abc123 to also add error handling"

6. jules_list_activities

Get detailed activity log including plan steps and progress updates.

Example prompt: "Show me the detailed activities for session abc123"

7. jules_approve_plan

Approve execution plan (only needed if autoApprove=false).

Example prompt: "Approve the plan for Jules session abc123"

8. jules_get_session_output

Retrieve final results and PR URL from completed session.

Example prompt: "Get the results from Jules session abc123"

Usage Examples

Basic Workflow

You: "I need to add authentication tests to my project"

Claude: I'll help you create a Jules session for that.
[Uses jules_list_sources to find your repos]
[Uses jules_create_session with your requirements]

Claude: Session created! ID: ses_abc123. Jules is working on this task.
I'll check back in 30 seconds.
[Waits, then uses jules_get_status periodically]

Claude: Jules completed the task! Here's the pull request: [URL]

Manual Plan Approval Workflow

You: "Create a Jules session to refactor the database layer, but I want to approve the plan first"

Claude: I'll create a session with manual approval.
[Uses jules_create_session with autoApprove=false]

Claude: Session created and waiting for plan approval.
[Uses jules_list_activities to show the plan]

You: "Looks good, approve it"

Claude: [Uses jules_approve_plan]
Plan approved! Jules is now executing.

Sending Follow-up Instructions

You: "Check on my Jules session ses_abc123"

Claude: [Uses jules_get_status]
Jules is working on adding tests. Currently implementing auth tests.

You: "Tell Jules to also add integration tests"

Claude: [Uses jules_send_message]
Message sent. Jules will incorporate this in the next steps.

Rate Limits and Quotas

Jules enforces task quotas based on subscription tier:

  • Free: 15 daily tasks, 3 concurrent tasks

  • Google AI Pro ($19.99/mo): ~75 daily tasks, 15 concurrent tasks

  • Google AI Ultra ($124.99/mo): ~300 daily tasks, 60 concurrent tasks

Tasks count against your quota even if they fail. The quota resets on a rolling 24-hour window.

Async Workflow Pattern

Jules sessions run asynchronously in cloud VMs. The typical workflow:

  1. Create session - Returns immediately with session ID

  2. Poll for status - Check every 10-30 seconds using jules_get_status

  3. Monitor activities - View detailed progress with jules_list_activities

  4. Retrieve results - Get PR URL when state is COMPLETED

Claude handles this polling automatically when you ask to monitor a task.

Troubleshooting

Tools not appearing in Claude Desktop

  1. Verify absolute path in config (not relative)

  2. Check that build/index.js exists after running npm run build

  3. Ensure API key is set correctly

  4. Restart Claude Desktop completely (not just reload)

  5. Check Console logs for error messages

"JULES_API_KEY environment variable required" error

  • API key not set in Claude Desktop config

  • Make sure the env object in config contains JULES_API_KEY

"No repositories connected to Jules" error

  1. Visit https://jules.google.com

  2. Click "Connect to GitHub account"

  3. Authorize the Jules GitHub app

  4. Select repositories to grant access

  5. Refresh the Jules web app to sync

Session fails immediately

  • Check repository is connected to Jules

  • Verify branch name exists

  • Ensure repository has proper access permissions

  • Check Jules web interface for detailed error messages

API errors (401, 403, 404)

Development

Run in Development Mode

npm run dev  # Watch mode - rebuilds on changes

Test with MCP Inspector

npm run inspector

This opens a web interface where you can test tools interactively without Claude Desktop.

Project Structure

jules-mcp-server/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts      # Main server and tool implementations
│   ā”œā”€ā”€ client.ts     # Jules API client helper
│   └── types.ts      # TypeScript type definitions
ā”œā”€ā”€ build/            # Compiled JavaScript (git-ignored)
ā”œā”€ā”€ package.json      # Dependencies and scripts
ā”œā”€ā”€ tsconfig.json     # TypeScript configuration
└── .env              # API key (git-ignored, create from .env.example)

Adding New Tools

  1. Define types in src/types.ts

  2. Add tool registration in src/index.ts following the existing pattern

  3. Use Zod schemas for input validation

  4. Wrap implementation in try-catch with proper error responses

  5. Rebuild: npm run build

Security Best Practices

  1. Never commit API keys - Use .env or Claude Desktop config only

  2. Use .gitignore - Ensure .env and build/ are excluded

  3. Rotate keys regularly - Regenerate at https://jules.google.com/settings#api

  4. Monitor usage - Check Jules web interface for unexpected activity

  5. Limit repository access - Only grant Jules access to necessary repos

Claude Desktop Configuration Tips

Use absolute paths:

āœ… "/Users/username/jules-mcp-server/build/index.js"
āŒ "~/jules-mcp-server/build/index.js"
āŒ "./jules-mcp-server/build/index.js"

Multiple servers:

{
  "mcpServers": {
    "jules": { ... },
    "other-server": { ... }
  }
}

Debug logging: Check Claude Desktop logs:

  • macOS: ~/Library/Logs/Claude/

  • Windows: %APPDATA%\Claude\logs\

API Reference

This server implements the Jules API v1alpha:

  • Base URL: https://jules.googleapis.com/v1alpha

  • Authentication: X-Goog-Api-Key header

  • Documentation: https://jules.google.com (requires account)

Resources

License

MIT

Contributing

Contributions welcome! Please ensure:

  • TypeScript compiles without errors

  • All tools follow the error handling pattern

  • Documentation is updated for new features

  • No API keys or secrets in commits

Changelog

v1.0.0 (2025-01-15)

  • Initial release

  • 8 core tools for Jules API integration

  • Stdio transport for Claude Desktop

  • Comprehensive error handling and logging

  • Full TypeScript type safety

Available Tools

8 tools
jules_approve_planApprove Jules Execution PlanA

Approve the execution plan for a Jules session that has requirePlanApproval=true. Only needed when session state is WAITING_FOR_PLAN_APPROVAL. View the plan first with jules_list_activities.

Inputs: sessionId (required).

jules_create_sessionCreate Jules Coding SessionB

Start a new asynchronous coding task with Jules. Provide a detailed task description and the repository to work on. Jules runs in an isolated cloud VM and typically completes tasks in 5-60 minutes depending on complexity.

Inputs: prompt (required), repoName (required), repoOwner (required), title, +3 more.

jules_get_session_outputGet Jules Session OutputA

Retrieve the final output and results from a completed Jules session, including pull request details. Use after session state is COMPLETED.

Inputs: sessionId (required).

jules_get_statusGet Jules Session StatusA

Check the current status and recent activity of a Jules session. Use this to poll for progress and completion. Sessions typically take 5-60 minutes to complete.

Inputs: sessionId (required), includeActivities.

jules_list_activitiesList Jules Session ActivitiesA

Get detailed activity log for a Jules session. Activities include plan generation, progress updates, messages, and completion events. Most recent activities appear first.

Inputs: sessionId (required), limit, pageToken.

jules_list_sessionsList Jules SessionsB

List all your Jules sessions with their current states. Useful for finding session IDs or checking on multiple tasks.

Inputs: pageSize, pageToken.

jules_list_sourcesList Jules SourcesA

List all GitHub repositories connected to Jules. You must install the Jules GitHub app at https://jules.google.com before repositories appear here.

Inputs: pageSize, pageToken.

jules_send_messageSend Message to Jules SessionA

Send a follow-up message or instruction to a running Jules session. Jules will respond in the next activity, which you can see with jules_list_activities or jules_get_status.

Inputs: message (required), sessionId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 8 tools

    Disambiguation4/5

    Each tool maps to a distinct session lifecycle action: listing sources, creating/listing sessions, checking status, messaging, viewing activities, approving plans, and fetching output. The main risk is jules_get_status, jules_list_activities, and jules_get_session_output, which all surface session progress/results, but the descriptions clarify timing (poll vs. detailed log vs. final output).

    Naming Consistency5/5

    All tools use a uniform jules_ prefix followed by a consistent verb_noun snake_case pattern (list_sources, create_session, send_message, approve_plan). The only slight asymmetry is get_status vs. get_session_output, but the convention is clear and predictable.

    Tool Count5/5

    Eight tools is well-scoped for an async coding-agent server, with each tool covering a distinct step in the session lifecycle. No tool feels redundant or padded.

    Completeness4/5

    The surface covers discovery, creation, monitoring, interaction, plan approval, and result retrieval. The notable gap is the absence of a cancel/stop session operation, which agents may need for long-running or mistaken tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      A
      quality
      Not graded
      maintenance
      Enables 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
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables 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.
      6
      1
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables 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
      -