使用说明
Google Jules API MCP服务器
与Google Jules API集成的MCP服务器。提供列出源、管理会话、批准计划和发送消息的工具。
需求
- Node.js>=18
- Google Jules API密钥
用法
使用npx运行(建议MCP客户端使用):
npx @amitdeshmukh/google-jules-mcp
环境变量
JULES_API_KEY(必需):您的Google Jules API密钥。
示例 .env:
JULES_API_KEY=your_api_key_here
运行(CLI)
npx @amitdeshmukh/google-jules-mcp
MCP客户端配置
克劳德桌面
{
"mcpServers": {
"google-jules": {
"command": "npx",
"args": ["@amitdeshmukh/google-jules-mcp"],
"env": { "JULES_API_KEY": "your_api_key_here" }
}
}
}
光标
{
"mcpServers": {
"google-jules": {
"command": "npx",
"args": ["@amitdeshmukh/google-jules-mcp"],
"env": { "JULES_API_KEY": "your_api_key_here" }
}
}
}
工具
所有工具都返回JSON字符串,并在后台调用Jules API。
- 列表_来源 --列出可用来源
- get_source --按名称获取源(参数:
{ sourceName: string }) - 创建会话 --创建新会话(参数:
{ prompt: string, source: string }) - list_sessions --列出所有会话
- get_session --按ID获取会话(参数:
{ sessionId: string }) - 批准计划 --批准会话计划(参数:
{ sessionId: string }) - list_活动 --列出会话中的所有活动(参数:
{ sessionId: string }) - send_message --在会话中向代理发送消息(参数:
{ sessionId: string, prompt: string })
用法示例
自然语言提示
- “列出我可以使用的所有Jules来源。”
- “显示指定源的详细信息
sources/github." - “创建一个Jules会话来重构我的仓库
my-repo为了更好的类型安全。" - “核准拟议的会议计划
12345." - “列出会议活动
12345." - “向会话发送消息
12345:继续进行测试。"
工具调用参数
列出来源:
{
"tool": "list_sources",
"params": {}
}
获取来源:
{
"tool": "get_source",
"params": { "sourceName": "sources/github/my-org/my-repo" }
}
创建会话:
{
"tool": "create_session",
"params": {
"prompt": "Refactor the codebase to improve type safety and add tests",
"source": "sources/github/my-org/my-repo",
"requirePlanApproval": true
}
}
列出会话:
{
"tool": "list_sessions",
"params": {}
}
获取会话:
{
"tool": "get_session",
"params": { "sessionId": "12345" }
}
批准计划:
{
"tool": "approve_plan",
"params": { "sessionId": "12345" }
}
列出活动:
{
"tool": "list_activities",
"params": { "sessionId": "12345" }
}
发送消息:
{
"tool": "send_message",
"params": {
"sessionId": "12345",
"prompt": "Continue with implementing the tests"
}
}
发展
npm install
npm test
npm run build
发布:
npm run release
许可证
麻省理工学院
