Skip to main content

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

VariableRequiredDefaultDescription
JETTY_API_TOKENYesYour Jetty API token (mlc_...)
JETTY_DOCK_URLNohttps://dock.jetty.ioDock API base URL
JETTY_FLOWS_URLNohttps://flows-api.jetty.ioFlows API base URL

Available Tools

The MCP server exposes 14 tools:

Collections

ToolDescription
list-collectionsList all collections accessible with your token
get-collectionGet collection details including environment variable keys

Tasks

ToolDescription
list-tasksList tasks in a collection
get-taskGet task details including the workflow JSON definition
create-taskCreate a new task with a workflow definition
update-taskUpdate a task's workflow definition or description

Workflow Execution

ToolDescription
run-workflowRun a workflow asynchronously — returns a workflow_id immediately
run-workflow-syncRun a workflow synchronously — blocks until completion (30–60s timeout)

Trajectories

ToolDescription
list-trajectoriesList recent workflow runs with pagination
get-trajectoryGet full details of a specific run (inputs, outputs, step results)

Analytics & Labels

ToolDescription
get-statsExecution statistics for a task
add-labelAdd a key-value label to a trajectory (e.g., quality=high)

Step Templates

ToolDescription
list-step-templatesList all available workflow step templates
get-step-templateGet 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