Jungle Grid MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Jungle Grid MCP lets MCP-aware agents estimate, submit, monitor, cancel, and retrieve artifacts from Jungle Grid workloads. It supports local stdio clients and hosted Streamable HTTP deployments that forward tool calls to the Jungle Grid API.
Use it for asynchronous AI workload execution, batch processing, training, fine-tuning, uploaded file or script backed jobs, lifecycle diagnostics, workload logs, and managed output artifacts.
Installation
Requirements:
- Node.js 18 or newer
- A Jungle Grid API key for local stdio, or an OAuth bearer token for hosted HTTP
- API scopes that match the tools you want to call
Run the local stdio server with npx:
Install globally if you prefer a stable executable:
Configuration
Local stdio uses environment variables:
| Variable | Required | Purpose |
| --- | --- | --- |
| JUNGLE_GRID_API_KEY | Yes for local stdio | Bearer token forwarded to the Jungle Grid API. |
| JUNGLEGRID_API_BASE | No | API base URL. Defaults to https://api.junglegrid.dev. |
| JUNGLE_GRID_API_URL | No | Legacy API base URL alias, also accepted. |
Hosted HTTP gateway deployments also support:
| Variable | Required | Purpose |
| --- | --- | --- |
| MCP_TRANSPORT=http | No | Starts Streamable HTTP instead of stdio. |
| PORT | No | HTTP port. Defaults to 3000. |
| JUNGLEGRID_INTERNAL_SERVICE_TOKEN | No | Service token used for OAuth introspection or fallback API calls. |
| OAUTH_ISSUER | No | OAuth issuer. Defaults to https://api.junglegrid.dev. |
| MCP_RESOURCE | No | Protected resource URL. Defaults to https://mcp.junglegrid.dev. |
| MCP_RESOURCE_METADATA_URL | No | OAuth protected-resource metadata URL. |
| OPENAI_APPS_CHALLENGE_TOKEN | No | Enables /.well-known/openai-apps-challenge when configured. |
Never commit API keys, OAuth tokens, signed upload URLs, signed artifact URLs, or callback secrets.
Connection Modes
Local stdio
Local clients launch the package and communicate over stdio.
Claude Desktop
Add the same mcpServers block to claude_desktop_config.json, then fully quit and reopen Claude Desktop.
macOS:
Windows:
Cursor
For project config, avoid checked-in secrets. Put the key in the environment used to launch Cursor:
For a local uncommitted Cursor config:
Hosted HTTP
The HTTP server exposes:
- GET /healthz
- GET /.well-known/oauth-protected-resource
- POST /mcp
Start it locally:
Hosted MCP clients must send Authorization: Bearer to POST /mcp. The server introspects tokens at /oauth/introspect on the configured API base and requires tool-specific scopes.
Minimal Working Example
Ask your MCP client to call the tools in this order:
If the estimate is acceptable, submit the job:
Use the returned job_id with get_job, get_job_events, get_job_logs, list_artifacts, and get_artifact.
MCP Tools
The current tool registry exposes these exact tool names:
| Tool | Purpose | Required parameters | Optional parameters |
| --- | --- | --- | --- |
| estimate_job | Estimate routing, capacity source, and expected cost without creating work. | workload_type | model_size, image, command, args, routing_mode, template, notes |
| submit_job | Submit a workload. This may start compute and incur usage charges. | name, workload_type, image | model_size, command, args, env, input_files, script_files, script_file, expected_artifacts, routing_mode, template, metadata |
| upload_job_input | Create a signed upload slot for an input file or script. | filename | content_type, kind |
| list_job_inputs | List uploaded inputs and scripts for the authenticated account. | none | none |
| list_jobs | List recent jobs. | none | limit, cursor, status |
| get_job | Read job status, phase, scheduling, billing, and artifact readiness. | job_id | none |
| get_job_events | Read lifecycle events for scheduling, provisioning, startup, failures, and cancellation. | job_id | none |