Jules MCP Server

Jules MCP Server

Enables orchestration of multiple Jules AI workers for tasks like code generation, bug fixing, and review using the Google Jules API. It features git integration, a shared memory system, and real-time activity monitoring for complex, multi-agent development workflows.

Category
访问服务器

README

Jules MCP Server

TypeScript-based Model Context Protocol (MCP) server for orchestrating multiple Jules AI instances with comprehensive code generation, bug fixing, and review capabilities.

🚀 Features

Core Capabilities

  • Multi-Instance Orchestration: Create and manage multiple Jules workers simultaneously
  • Real-Time Activity Monitoring: Track worker progress and status updates
  • Plan Approval Flow: Review and approve Jules-generated plans before execution
  • Direct Worker Communication: Send messages between workers for coordination
  • Shared Memory System: Store and retrieve data across worker sessions
  • Git Integration: Branch creation and merging for staged orchestration workflow

MCP Protocol Compliance

  • 3 Core Tools: jules_create_worker, jules_send_message, jules_get_activities
  • ESM Module Support: Modern JavaScript module system compatibility
  • Zod Schema Validation: Comprehensive input validation and error handling
  • TypeScript Implementation: Full type safety and modern development practices

Quick Start

Prerequisites

  • Node.js 18+
  • Jules API key

Installation via npx (Recommended)

# Install and run directly
npx jules-mcp

# Or install globally
npm install -g jules-mcp
jules-mcp

Local Development

# Clone repository
git clone https://github.com/access_aipro/jules-mcp-npx
cd jules-mcp

# Install dependencies
npm install

# Set up environment
export JULES_API_KEY="your-api-key-here"

# Start development server
npm run dev

# Build for production
npm run build
npm start

Configuration

Environment Variables

# Required
JULES_API_KEY=your-api-key-here

# Optional
SERVICE_PORT=8085                    # Server port
LOG_LEVEL=INFO                      # Logging level
JULES_API_BASE_URL=https://jules.googleapis.com  # API endpoint
MAX_COST_PER_HOUR=10.00             # Cost limit per hour
DAILY_COST_LIMIT=100.00             # Daily cost limit
CACHE_TTL=3600                      # Cache time-to-live (seconds)
RATE_LIMIT_REQUESTS=60              # Requests per minute
CODE_VALIDATION_ENABLED=true        # Enable code validation
COST_TRACKING_ENABLED=true          # Enable cost tracking

Get your API key from: https://jules.google.com/settings#api

MCP Client Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "jules-orchestrator": {
      "command": "npx",
      "args": ["jules-mcp"]
    }
  }
}

MCP Tools & Resources

🛠️ MCP Tools

  • jules_create_worker - Create Jules AI workers for specific implementation tasks (supports Roles: Maestro, Crew, Evaluator)
  • jules_send_direct_message - Send direct messages between workers
  • jules_estimate_work - Create an Evaluator worker for task estimation
  • jules_store_memory - Store shared memory values
  • jules_read_memory - Read shared memory values
  • jules_create_branch - Create a new git branch (essential for Staged Orchestration)
  • jules_merge_branch - Merge a feature branch into a target branch
  • jules_list_branches - List all local branches
  • jules_generate_code - Generate code for specific requirements with context awareness
  • jules_fix_bug - Analyze and fix bugs in existing code
  • jules_review_code - Comprehensive code review with security and quality assessment
  • jules_get_status - Check worker status and progress

📚 MCP Resources

  • jules_documentation:// - Comprehensive documentation for all features
  • jules_templates:// - Pre-built templates for common development patterns
  • jules_examples:// - Real-world examples and implementation patterns
  • workers://all - View all active workers
  • worker://{session_id}/status - Individual worker status

Usage Examples

Basic Code Generation

# Generate a React component
result = await jules_mcp.call_tool("jules_generate_code", {
    "prompt": "Create a React component for user login form with TypeScript",
    "language": "typescript",
    "context": {
        "framework": "react",
        "styling": "tailwind",
        "validation": "yup"
    }
})

Bug Fixing

# Fix a memory leak in Node.js application
result = await jules_mcp.call_tool("jules_fix_bug", {
    "code": "existing-code-with-leak.js",
    "error_description": "Memory usage increases over time",
    "expected_behavior": "Constant memory usage"
})

Code Review

# Review Python API endpoint
result = await jules_mcp.call_tool("jules_review_code", {
    "code": "api-endpoint.py",
    "language": "python",
    "focus_areas": ["security", "performance", "error_handling"]
})

Claude + Jules Workflow

1. Planning Phase (Claude)

Claude creates detailed specifications and planning documents using the knowledge base:

## Feature: User Authentication System

### Requirements
- Email/password authentication
- JWT token management
- Session handling
- Password reset functionality

### Technical Specifications
- Use bcrypt for password hashing
- JWT with 15-minute expiration
- Refresh token mechanism
- Rate limiting for login attempts

2. Implementation Phase (Jules)

Jules implements based on Claude's specifications:

await jules_mcp.call_tool("jules_create_worker", {
    "task_description": planning_document,
    "source": "current-repository",
    "title": "User Authentication Implementation"
})

3. Review & Integration

Both Claude and Jules collaborate on code quality and integration.

Knowledge Base

The Jules MCP server includes a comprehensive knowledge base with:

  • 250+ Community-Curated Prompts: From the Google Jules Awesome List
  • 20+ Development Categories: Web, mobile, backend, DevOps, security
  • Real-World Examples: Production-tested patterns and implementations
  • Performance Benchmarks: Optimization strategies and best practices

Access the knowledge base through:

  • JULES_KNOWLEDGE_BASE.md - Complete prompt library
  • MCP tools for prompt recommendations
  • Context-aware suggestions based on project type

Testing

# Run comprehensive test suite
npm test

# Build and type check
npm run build

# Lint code
npm run lint

# Development with hot reload
npm run dev

Monitoring & Analytics

Health Checks

# Basic health
GET /health

# Detailed health with Jules API status
GET /health/detailed

# Cost tracking status
GET /health/cost-tracker

Metrics Available

  • Request Volume: API calls per minute/hour
  • Cost Tracking: Real-time cost accumulation
  • Cache Performance: Hit rates and efficiency
  • Error Rates: Types and frequency of errors
  • Response Times: Latency percentiles

Status

Production Ready - Enhanced implementation with knowledge base integration ✅ Google Jules API - Full API integration with cost optimization ✅ MCP Protocol - Complete Model Context Protocol compliance ✅ Knowledge Base - 250+ community-curated prompts integrated ✅ Performance - 11,981+ activities/second capability demonstrated ✅ Enterprise Features - Cost tracking, security, monitoring

Architecture

  • src/index.ts - Main MCP server entry point with tool registration
  • src/jules-client.ts - Jules API client with TypeScript types
  • src/worker-manager.ts - Worker orchestration and management
  • dist/ - Compiled JavaScript output for distribution
  • package.json - Node.js package configuration and dependencies

Built with: @modelcontextprotocol/sdk, TypeScript, axios, zod


Version: 1.0.0 | Last Updated: 2026-01-24 | Support: Enterprise Available

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选