MCP Server Setup
Jetty's MCP (Model Context Protocol) server lets any MCP-compatible agent or editor interact with your Jetty workflows. MCP is an open standard that gives AI agents structured access to external tools — in this case, Jetty's full API for creating, running, and monitoring workflows.
Prerequisites
- A Jetty account and API token (see Setup)
- Node.js 18+
Setup by Client
Claude Code
The recommended path for Claude Code is the plugin. If you prefer MCP-only (no slash commands):
Add to your project's .mcp.json:
{
"mcpServers": {
"jetty": {
"command": "npx",
"args": ["-y", "jetty-mcp-server"],
"env": {
"JETTY_API_TOKEN": "mlc_your_token_here"
}
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"jetty": {
"command": "npx",
"args": ["-y", "jetty-mcp-server"],
"env": {
"JETTY_API_TOKEN": "mlc_your_token_here"
}
}
}
}
VS Code Copilot
Add to .vscode/mcp.json:
{
"servers": {
"jetty": {
"command": "npx",
"args": ["-y", "jetty-mcp-server"],
"env": {
"JETTY_API_TOKEN": "mlc_your_token_here"
}
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"jetty": {
"command": "npx",
"args": ["-y", "jetty-mcp-server"],
"env": {
"JETTY_API_TOKEN": "mlc_your_token_here"
}
}
}
}
Zed
Add to ~/.config/zed/settings.json under "context_servers":
{
"context_servers": {
"jetty": {
"command": {
"path": "npx",
"args": ["-y", "jetty-mcp-server"],
"env": {
"JETTY_API_TOKEN": "mlc_your_token_here"
}
}
}
}
}
Gemini CLI
Install the extension:
gemini extensions install gemini-extension.json
(The gemini-extension.json is included in the agent-skill repo.)
Any MCP Client
Run the server directly:
JETTY_API_TOKEN=mlc_your_token_here npx -y jetty-mcp-server
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
JETTY_API_TOKEN | Yes | — | Your Jetty API token (mlc_...) |
JETTY_DOCK_URL | No | https://dock.jetty.io | Dock API base URL |
JETTY_FLOWS_URL | No | https://flows-api.jetty.io | Flows API base URL |
Available Tools
The MCP server exposes 14 tools:
Collections
| Tool | Description |
|---|---|
list-collections | List all collections accessible with your token |
get-collection | Get collection details including environment variable keys |
Tasks
| Tool | Description |
|---|---|
list-tasks | List tasks in a collection |
get-task | Get task details including the workflow JSON definition |
create-task | Create a new task with a workflow definition |
update-task | Update a task's workflow definition or description |
Workflow Execution
| Tool | Description |
|---|---|
run-workflow | Run a workflow asynchronously — returns a workflow_id immediately |
run-workflow-sync | Run a workflow synchronously — blocks until completion (30–60s timeout) |
Trajectories
| Tool | Description |
|---|---|
list-trajectories | List recent workflow runs with pagination |
get-trajectory | Get full details of a specific run (inputs, outputs, step results) |
Analytics & Labels
| Tool | Description |
|---|---|
get-stats | Execution statistics for a task |
add-label | Add a key-value label to a trajectory (e.g., quality=high) |
Step Templates
| Tool | Description |
|---|---|
list-step-templates | List all available workflow step templates |
get-step-template | Get the full schema and documentation for a specific template |
Verifying Your Setup
After configuring the MCP server, ask your agent:
"List my Jetty collections"
If the token is valid, you'll see your collections. If you get a 401 error, double-check the token value.
Next Steps
- Agent Recipes — Practical workflows to try with your agent
- Common Gotchas — Known quirks that trip up agents
- Claude Code Plugin — If you're using Claude Code, the plugin adds
/jettycommands on top of MCP