Jules API MCP Server

An MCP server for Jules — Google's AI coding agent.

README.md

jules-api-mcp

An MCP server for Jules — Google's AI coding agent. Manage Jules sessions from any MCP-compatible client: Claude, Gemini CLI, Cursor, Zed, VS Code, and more.

Tools

Tool Description
list_sessions List all Jules sessions
get_session Get session details and current state
create_session Create a new Jules session
approve_plan Approve Jules's plan to proceed with execution
send_message Send feedback or instructions to Jules
list_activities Full activity timeline for a session
get_last_message Jules's latest outbound message
get_pr_url Get the PR URL from a completed session

Requirements

  • Node.js 18+
  • A Jules API key (JULES_API_KEY)

Installation

From source

git clone https://github.com/GreyC/jules-api-mcp
cd jules-api-mcp
npm install
npm run build

Configuration

Add to your MCP client config (e.g. ~/.claude/claude_desktop_config.json or ~/.gemini/settings.json):

{
  "mcpServers": {
    "jules": {
      "command": "node",
      "args": ["/path/to/jules-api-mcp/dist/index.js"],
      "env": {
        "JULES_API_KEY": "<your-key>"
      }
    }
  }
}

Usage Examples

List all sessions:

list_sessions()

Create a session with auto PR:

create_session(
  repo="owner/repo",
  prompt="Refactor the login function in auth.py to use async/await",
  automation_mode="AUTO_CREATE_PR"
)

Approve a plan:

approve_plan(session_id="<ID>")

Send feedback:

send_message(session_id="<ID>", message="Looks good, please create the PR.")

Session States

State Meaning
IN_PROGRESS Jules is actively working
AWAITING_PLAN_APPROVAL Jules generated a plan, waiting for approval
AWAITING_USER_FEEDBACK Jules has a question mid-execution
COMPLETED Jules finished
FAILED Unrecoverable error

Related

  • jules-skill — Agent skill with workflow guidance, decision heuristics, and prompt templates for autonomous Jules management

License

MIT

Tools 8

list_sessionsList all Jules sessions
get_sessionGet session details and current state
create_sessionCreate a new Jules session
approve_planApprove Jules's plan to proceed with execution
send_messageSend feedback or instructions to Jules
list_activitiesFull activity timeline for a session
get_last_messageJules's latest outbound message
get_pr_urlGet the PR URL from a completed session

Environment Variables

JULES_API_KEYrequiredAPI key for accessing Jules services

Try it

List all my active Jules coding sessions.
Create a new Jules session for repository owner/repo to refactor the authentication module.
Approve the current execution plan for session ID <ID>.
Send a message to Jules in session <ID> asking it to prioritize the bug fix over the refactor.
Get the PR URL for my most recently completed Jules session.

Frequently Asked Questions

What are the key features of Jules API MCP?

Manage Jules AI coding agent sessions from any MCP-compatible client. Create new coding sessions with specific prompts and automation modes. Approve execution plans and provide feedback mid-session. Retrieve session activity timelines and latest messages. Fetch PR URLs directly from completed autonomous coding sessions.

What can I use Jules API MCP for?

Streamlining autonomous coding workflows by managing Jules directly from your IDE. Reviewing and approving AI-generated coding plans before execution. Monitoring the progress of long-running AI coding tasks via activity timelines. Automating the creation of pull requests through Jules AI agent sessions.

How do I install Jules API MCP?

Install Jules API MCP by running: git clone https://github.com/GreyC/jules-api-mcp && cd jules-api-mcp && npm install && npm run build

What MCP clients work with Jules API MCP?

Jules API MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Jules API MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare