Jules MCP Server
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.
README
Jules MCP Server
A production-ready Model Context Protocol (MCP) server for the Google Jules API, enabling autonomous coding tasks and scheduling directly from AI assistants like Claude.
⚠️ DISCLAIMER: This is an independent, open-source project and is NOT officially created, maintained, or endorsed by Google. This server is a community-driven integration with the public Jules API. Use at your own risk. For official Jules documentation, visit jules.google.
🌟 Star This Repository
If you find this useful, please star ⭐ the repository to help others discover it!
Overview
This MCP server bridges the Google Jules coding agent with AI assistants, allowing you to:
- Create coding tasks - Delegate bug fixes, refactoring, tests, and features to Jules
- Schedule recurring tasks - Set up automated weekly/daily maintenance (dependency updates, security audits, etc.)
- Monitor progress - Track session states and review generated plans
- Approve plans - Human-in-the-loop control before code changes
- Manage workflows - Send feedback and iterate on Jules's work
Architecture: The "Thick Server" Pattern
Since the Jules API v1alpha is stateless (no native scheduling endpoints), this server implements a local scheduling engine:
- Persistent Storage: Schedules stored in
~/.jules-mcp/schedules.json - Cron Engine: Uses
node-schedulefor reliable task execution - Survives Restarts: Schedules are rehydrated on server startup
- Autonomous Execution: Scheduled tasks run even without active IDE sessions
Installation
Prerequisites
- Node.js 18.0.0 or higher
- Jules API Key - Generate at jules.google/settings
- GitHub Repositories - Connect repos to Jules via the web UI first
Setup
# Clone or download this repository
cd jules-mcp
# Install dependencies
npm install
# Build TypeScript
npm run build
# Set your API key
export JULES_API_KEY="your-key-here"
# Test the server
npm start
Quick smoke test (MCP stdio)
After building and setting JULES_API_KEY, you can validate the server end-to-end:
npm run mcp:smoke
Expected output (with a valid key):
- Lists 6 tools, 5 prompts, and the 4 core resources
- Attempts to read a fake session ID and reports a Jules 404 (proves real API calls work)
- Attempts a tool call with dummy data and reports the API error without crashing
Global Installation (Recommended)
# Install globally
npm install -g
# Now available as: jules-mcp
jules-mcp
Configuration
Environment Variables
Create a .env file or set these in your shell:
# Required
JULES_API_KEY=your_jules_api_key_here
# Optional - Security allowlist (comma-separated repo names)
# If set, only these repos can be modified
JULES_ALLOWED_REPOS=owner/repo1,owner/repo2
# Optional - Default branch
JULES_DEFAULT_BRANCH=main
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"jules": {
"command": "node",
"args": ["/path/to/jules-mcp/dist/index.js"],
"env": {
"JULES_API_KEY": "your-key-here"
}
}
}
}
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
VS Code / Cursor Configuration
For Cursor or VS Code with MCP support:
{
"mcp.servers": {
"jules": {
"command": "jules-mcp",
"env": {
"JULES_API_KEY": "your-key-here"
}
}
}
}
Usage
Once configured, your AI assistant can use Jules through natural language:
Creating Immediate Tasks
"Use Jules to add unit tests for the authentication module in my-app-backend repository"
The assistant will:
- Check
jules://sourcesto find the repository - Call
create_coding_tasktool with appropriate prompt - Return the session ID for monitoring
Scheduling Recurring Tasks
"Schedule Jules to update dependencies every Monday at 9 AM in my-app-backend"
The assistant will:
- Call
schedule_recurring_taskwith cron"0 9 * * 1" - Save the schedule to
~/.jules-mcp/schedules.json - Confirm the next execution time
Monitoring Progress
"Check the status of Jules session abc123"
The assistant will:
- Call
get_session_statusor readjules://sessions/abc123/full - Show current state (PLANNING, IN_PROGRESS, COMPLETED, etc.)
- Provide next steps based on state
Reviewing and Approving Plans
"Show me Jules's plan for session abc123 and approve it"
The assistant will:
- Read
jules://sessions/abc123/fullto get the plan - Display the plan steps to you
- Call
manage_sessionwithaction=approve_planafter your confirmation
Available Resources
Resources are read-only context that the AI can access:
| URI | Description |
|---|---|
jules://sources |
Connected GitHub repositories |
jules://sessions/list |
Recent Jules sessions |
jules://sessions/{id}/full |
Complete session details with activities |
jules://schedules |
Active scheduled tasks |
jules://schedules/history |
Execution history |
Available Tools
Tools are actions the AI can execute:
create_coding_task
Creates an immediate Jules coding session.
Parameters:
prompt(required) - Natural language task instructionsource(required) - Repository (format:sources/github/owner/repo)branch(optional) - Target branch (default:main)auto_create_pr(optional) - Auto-create PR (default:true)require_plan_approval(optional) - Pause for review (default:false)title(optional) - Session title
Returns: Session ID and monitoring URL
manage_session
Manage active sessions (approve plans, send feedback).
Parameters:
session_id(required)action(required) -"approve_plan"or"send_message"message(optional) - Required forsend_message
get_session_status
Check session status and get next steps.
Parameters:
session_id(required)
schedule_recurring_task
Schedule a task to run on a cron schedule.
Parameters:
task_name(required) - Unique schedule identifiercron_expression(required) - Standard cron formatprompt(required) - Task instructionsource(required) - Repository resource namebranch,auto_create_pr,require_plan_approval,timezone(optional)
Cron Examples:
"0 9 * * 1"- Every Monday at 9 AM"0 2 * * *"- Every day at 2 AM"0 0 1 * *"- First day of each month at midnight
list_schedules
List all active scheduled tasks with next run times.
delete_schedule
Remove a scheduled task.
Parameters:
task_name(required)
Available Prompts
Prompts are templates that guide best practices:
refactor_module- Guided refactoring workflowsetup_weekly_maintenance- Automated maintenance setupaudit_security- Comprehensive security auditfix_failing_tests- Test failure resolutionupdate_dependencies- Dependency update with breaking change handling
Security Considerations
API Key Security
- Never commit your
JULES_API_KEYto version control - Store in environment variables or secure secrets manager
- The API key grants write access to connected repositories
Repository Allowlist
Use JULES_ALLOWED_REPOS to restrict which repositories can be modified:
export JULES_ALLOWED_REPOS="myorg/safe-repo,myorg/test-repo"
This prevents accidental modifications to production or sensitive repos.
Plan Approval Workflow
For critical repositories, always set require_plan_approval: true:
"Create a task but require plan approval before any code changes"
This ensures human review before Jules modifies code.
Audit Logging
All scheduled task executions are logged to jules://schedules/history. Review this regularly to audit autonomous activities.
Troubleshooting
"JULES_API_KEY environment variable is required"
Set your API key:
export JULES_API_KEY="your-key-here"
"Repository not found" error
- Check
jules://sourcesresource to see connected repos - Ensure the GitHub app is installed on the repository
- Use the exact resource name format:
sources/github/owner/repo
Schedules not persisting
Check that ~/.jules-mcp/schedules.json exists and is writable.
TypeScript compilation errors
npm run typecheck
Development
Project Structure
src/
types/ # TypeScript type definitions
jules-api.ts # Jules API types
schedule.ts # Schedule types
api/ # API client layer
jules-client.ts
storage/ # Persistence layer
schedule-store.ts
scheduler/ # Cron engine
cron-engine.ts
mcp/ # MCP protocol layer
resources.ts # Resources implementation
tools.ts # Tools implementation
prompts.ts # Prompt templates
index.ts # Main entry point
Build Commands
npm run build # Compile TypeScript
npm run dev # Development mode with tsx
npm run typecheck # Type checking only
API Endpoints Covered
This server provides complete coverage of the Jules v1alpha API:
| Endpoint | Method | MCP Mapping |
|---|---|---|
/sources |
GET | Resource: jules://sources |
/sources/{name} |
GET | Included in full session resource |
/sessions |
POST | Tool: create_coding_task |
/sessions |
GET | Resource: jules://sessions/list |
/sessions/{id} |
GET | Tool: get_session_status |
/sessions/{id}:approvePlan |
POST | Tool: manage_session (approve_plan) |
/sessions/{id}:sendMessage |
POST | Tool: manage_session (send_message) |
/sessions/{id}/activities |
GET | Resource: jules://sessions/{id}/full |
Additional Capabilities (Beyond API)
- Local scheduling - Cron-based task execution
- Schedule persistence - Survives server restarts
- Execution history - Audit trail for scheduled tasks
Future Roadmap
When Jules API adds native scheduling:
- The
schedule_recurring_tasktool will migrate from local cron to API calls - Existing local schedules can be migrated automatically
- The MCP tool interface remains unchanged for backward compatibility
Resources
- Jules API Documentation: https://developers.google.com/jules/api
- Jules Web Interface: https://jules.google
- Model Context Protocol: https://modelcontextprotocol.io
- MCP TypeScript SDK: https://github.com/modelcontextprotocol/typescript-sdk
License
MIT
Contributing
This is an open-source implementation. Contributions welcome for:
- Additional prompt templates
- Enhanced error handling
- Webhook support (when Jules API adds it)
- Advanced scheduling features (conditional execution, dependency chains)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。