Jetic
Guides

AI IDE Integration (MCP)

Connect Jetic to Claude Code, Cursor, opencode, Antigravity, Windsurf and VS Code over the Model Context Protocol.

Jetic ships a stdio MCP server (jetic mcp) that gives the AI assistant inside your editor typed tools to inspect, author, validate, and live-test your API model and workflows.

It uses your editor's own model — there is no OpenRouter/OpenAI key, no jetic config ai, and no jetic scan required to begin. Because the AI reads your code directly, this path also works for any backend stack (Express, FastAPI, Go, Java, NestJS, …).

jetic mcp

How project resolution works

Every tool accepts an optional projectPath. Resolution order:

projectPath argument — per call, highest priority.

JETIC_PROJECT_PATH environment variable — recommended for editor configs.

The server process working directory — walks up the tree to find .jetic/model.json.

If no model.json exists, read tools return modelExists: false with a hint instead of pretending an empty model is real. Run jetic init + jetic scan first in that case.

Editor setup

All entries are local stdio servers. After adding the config, restart the editor (or refresh its MCP panel) and look for the jetic_ tools.

Windows paths

Prefer "command": "node" with absolute forward-slash paths in args (e.g. C:/Users/you/Jetic/packages/mcp-server/dist/index.js). Plain jetic / npx work if the binary is on PATH, but absolute paths survive editor restarts and workspace switches. Windows npm shims need cmd /c.

Add to opencode.json (project root or ~/.config/opencode/opencode.json). command is an array; env goes under environment:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "jetic": {
      "type": "local",
      "command": ["node", "C:/Users/you/Jetic/packages/mcp-server/dist/index.js"],
      "environment": { "JETIC_PROJECT_PATH": "C:/path/to/my-api" },
      "enabled": true
    }
  }
}

Or via the CLI binary (must be on PATH):

"command": ["jetic", "mcp", "--project", "C:/path/to/my-api"]

Verify:

opencode mcp list

To limit context, disable globally and enable per agent:

{
  "mcp": { "jetic": { "type": "local", "command": ["jetic", "mcp"], "enabled": true } },
  "tools": { "jetic_*": false },
  "agent": { "build": { "tools": { "jetic_*": true } } }
}

Onboarding prompts

Paste these into your editor's agent chat, in order.

  1. Meet Jetic (first message)

    I've installed the Jetic MCP tools. Summarize what you can do with them, then read my project's model summary and tell me what's in it.

  2. Re-analyse the whole project

    Help me re-analyse the whole project: find ALL API endpoints — routes, controllers, middleware, auth guards, request/response shapes — and add every missing endpoint to .jetic/model.json using the jetic tools. Include security, middleware chains, parameters, and response schemas. When done, run jetic_verify_model and fix all errors.

  3. Zoom into one area

    Analyse ONLY src/modules/payments: add/update all of its endpoints with full detail (middleware, auth, validation constraints), then verify.

  4. Create a workflow

    Create a workflow called "Shopper checkout": register a user with a faker email and capture the credentials, log in and capture the access token, then create an order with the Bearer token expecting 201. Validate it BEFORE saving, save it, and simulate it against http://localhost:3000.

  5. Live-test loop

    Test POST /api/auth/login against my local server at http://localhost:4000 with a realistic payload and tell me whether the response matches the model. Then verify the whole model and fix any issues.

Behind the scenes the agent follows the structured order: jetic_init → jetic_scan (or jetic_add_endpoint) → jetic_verify_model → jetic_validate_workflow → jetic_create_workflow → jetic_simulate_workflow. If a step fails, paste the error back — validation messages name the exact fix.

MCP tools

The server advertises machine-readable annotations (readOnlyHint, destructiveHint, openWorldHint) and startup instructions that nudge agents through initialize → model → simulate. Tool calls execute one at a time in arrival order, so agents may fire parallel calls safely.

#ToolKindPurpose
1jetic_read_modelreadFull model or metadata summary (summaryOnly)
2jetic_list_endpointsreadFilter by method / tag / resource / pathContains
3jetic_get_endpointreadFull detail of one endpoint by id or method + path
4jetic_add_endpointwriteAdd/upsert an endpoint with full fidelity (middleware, security, constraints, pagination, rate limits, ownership, produces/consumes)
5jetic_update_endpointwritePartial update — same field coverage as add
6jetic_delete_endpointdestructiveRemove by id or method + path
7jetic_verify_modelreadValidate duplicates, unbound params, bad status codes, dangling sources, unknown schemes
8jetic_test_endpointlive HTTPReal request with custom headers/body/query merged over generated data
9jetic_manage_environmentwritelist / add / update / delete environments
10jetic_list_workflowsreadWorkflows from .jetic/workflows/ or embedded in the model
11jetic_simulate_workflowlive HTTPEnd-to-end simulation with memory capture and validation
12jetic_simulatelive HTTPAlias of jetic_simulate_workflow
13jetic_validate_workflowreadDry-run validation: structure, endpoint cross-refs, and full memory data-flow
14jetic_create_workflowwriteSave a workflow; refuses to save while validation errors remain
15jetic_update_workflowwriteRename / replace steps / appendSteps, validated before writing
16jetic_delete_workflowdestructiveDelete a workflow file by slug/name/path
17jetic_initwriteScaffold .jetic/ for repos without a model
18jetic_scanwriteKeyless static AST scan (Express + TypeScript, needs tsconfig.json)

Session & change tracking

Alongside the core tools:

  • jetic_get_session_phase — returns the current phase (init → scan → verify → simulate) and the next action, so an agent can self-orient at the start of a session.
  • jetic_get_changes — reads .jetic/changes.json to re-index only edited files instead of the whole codebase.
  • jetic_clear_changes — clears the change log after the model is updated.

Authoring loop

Discover — jetic_list_endpoints for exact method + path values (the validator rejects unknown routes with suggestions).

Draft with memory chaining:

  • Producer: capture (response → memory) or captureInput (request → memory).
  • Consumer: inject headers/bodies, {{workflow:key}} templates, {{faker.*}} data.
  • Human: {{human:key}} pauses for interactive input; the first answer is cached.

Dry-run — jetic_validate_workflow with the inline definition; fix every error.

Save — jetic_create_workflow (overwrite: false by default protects existing files).

Execute — jetic_simulate_workflow against a live server; iterate with jetic_update_workflow.

Troubleshooting

SymptomCause / Fix
No jetic_ tools in the editorWrong command/path. Check the editor's MCP log. Use absolute node + absolute dist/index.js. Rebuild: pnpm --filter @jetic/mcp-server run build.
Tools run against the wrong projectServer cwd ≠ your project. Set JETIC_PROJECT_PATH (or projectPath per call, or jetic mcp --project …).
modelExists: falseNo .jetic/model.json found upward from the resolved path. Run jetic init + jetic scan.
Invalid JSON in model file …A hand edit broke the file. Restore from git or regenerate with jetic scan.
jetic_test_endpoint / simulate fail with fetch failedThe target server isn't running. Start it, or pass baseUrl / envName for a live environment. Default timeout 15 s (timeoutMs, max 120 s).
EPIPE / server exits on editor closeNormal — the editor closed the stdio pipe. Restart via the editor's MCP refresh.
Slow completions / context bloatJetic adds many tools. Scope jetic_* per agent (see the opencode tab).

On this page