Skip to content

Commit 497445f

Browse files
committed
Register Jules connector in server.js
1 parent 323e15e commit 497445f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

server.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import rateLimit from "express-rate-limit";
99
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1010
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
1111

12-
import { GITHUB_TOKEN, NOTION_TOKEN, MEM0_API_KEY, CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, CONTEXT7_API_KEY, GEMINI_API_KEY, MCP_SHARED_KEY, IP_ALLOWLIST_ENABLED, ALLOWED_IP_RANGES, TRUST_PROXY_HOPS, GITHUB_APP_ID, GITHUB_APP_INSTALLATION_ID, GITHUB_APP_PRIVATE_KEY } from "./config.js";
12+
import { GITHUB_TOKEN, NOTION_TOKEN, MEM0_API_KEY, CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, CONTEXT7_API_KEY, GEMINI_API_KEY, JULES_API_KEY, MCP_SHARED_KEY, IP_ALLOWLIST_ENABLED, ALLOWED_IP_RANGES, TRUST_PROXY_HOPS, GITHUB_APP_ID, GITHUB_APP_INSTALLATION_ID, GITHUB_APP_PRIVATE_KEY } from "./config.js";
1313
import { safeEqual, isIpInCidr, getClientIp } from "./connectors/security.js";
1414
import * as github from "./connectors/github/tools.js";
1515
import * as resource from "./connectors/github/resource.js";
@@ -22,6 +22,7 @@ import * as agent from "./connectors/gemini/agent_tools.js";
2222
import * as research from "./connectors/exa/research_tools.js";
2323
import * as frontend from "./connectors/frontend/designer_tools.js";
2424
import * as sync from "./connectors/sync/mem0_notion.js";
25+
import * as jules from "./connectors/jules/tools.js";
2526

2627
// Build the MCP server once at startup and reuse it across all requests.
2728
const mcpServer = new McpServer({
@@ -40,6 +41,7 @@ agent.register(mcpServer);
4041
research.register(mcpServer);
4142
frontend.register(mcpServer);
4243
sync.register(mcpServer);
44+
jules.register(mcpServer);
4345

4446
// Adding a new connector:
4547
// import * as myThing from "./connectors/myThing/tools.js";
@@ -130,6 +132,7 @@ app.get("/", requireMcpKey, requireAllowedIp, (_req, res) => {
130132
context7: true, // works unauthenticated at lower rate limits, so always "configured"
131133
gemini: Boolean(GEMINI_API_KEY),
132134
frontend: Boolean(GEMINI_API_KEY), // delegate_designer's agent loop runs on the Gemini connector -- no separate frontend provider config anymore
135+
jules: Boolean(JULES_API_KEY),
133136
auth: Boolean(MCP_SHARED_KEY),
134137
},
135138
});
@@ -167,6 +170,7 @@ if (process.env.NODE_ENV !== "test" && !process.env.VERCEL) {
167170
if (!CLOUDFLARE_API_TOKEN || !CLOUDFLARE_ACCOUNT_ID) console.warn("WARNING: CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_ID not set. Cloudflare tools will fail.");
168171
if (!CONTEXT7_API_KEY) console.warn("NOTE: CONTEXT7_API_KEY is not set. Context7 tools will work but at lower, unauthenticated rate limits.");
169172
if (!GEMINI_API_KEY) console.warn("WARNING: GEMINI_API_KEY is not set. delegate_agent will fail entirely, and delegate_research's precision mode (url+question) will fail (wide mode is Exa-backed and unaffected).");
173+
if (!JULES_API_KEY) console.warn("WARNING: JULES_API_KEY is not set. jules_* tools will fail.");
170174
if (!MCP_SHARED_KEY) console.warn("WARNING: MCP_SHARED_KEY is not set. The /mcp, /mcp/:key, and / endpoints are OPEN to anyone who has the URL.");
171175
if (!GITHUB_APP_ID || !GITHUB_APP_INSTALLATION_ID || !GITHUB_APP_PRIVATE_KEY) console.warn("NOTE: GITHUB_APP_ID/GITHUB_APP_INSTALLATION_ID/GITHUB_APP_PRIVATE_KEY not fully set. get_repo_clone_token (private-repo sandbox clone) will fail until the GitHub App is configured.");
172176
console.log(`IP allowlist: ${IP_ALLOWLIST_ENABLED ? `ENABLED (${ALLOWED_IP_RANGES.join(", ")})` : "DISABLED"}`);

0 commit comments

Comments
 (0)