Skip to content

MCP Server

ewyct edited this page Jul 4, 2026 · 2 revisions

MCP Server

The Lastest MCP server (@lastest/mcp-server) is a Model Context Protocol server that lets AI agents (Claude Code, Claude Desktop, Cursor, Cline, Windsurf, etc.) drive your Lastest instance directly.

With it, an agent can:

  • List repositories, tests, functional areas, and builds
  • Create and run tests, including AI-authored tests from a URL or prompt
  • Verify builds and inspect test runs, change maps, and background jobs
  • Review visual diffs, decide/validate them, and approve / reject baselines
  • Heal failing tests via AI, and get application-code fix suggestions (suggest_app_fix)
  • Publish and revoke public /r/ share links

The tool surface was consolidated into 24 resource-oriented tools (e.g. lastest_test, lastest_build, lastest_repo, lastest_share) plus verbs (run_tests, verify, heal_test, decide_diff, validate_diff, suggest_app_fix, publish_share, scout_url, …).

Package

Prerequisites

  1. A running Lastest instance reachable over HTTP(S).
  2. An API key generated from the Lastest UI: Settings → Runners & API Access → Create API Key (see Settings Reference). Copy the key — it is shown only once.
  3. Node.js 18+ on the machine running the agent.

Quick start — Claude Code

claude mcp add lastest -- npx -y @lastest/mcp-server@latest \
  --url https://your-lastest-instance \
  --api-key YOUR_API_KEY

Verify it loaded:

claude mcp list

Quick start — Claude Desktop / generic JSON config

Add this to claude_desktop_config.json (or any MCP-compatible client config):

{
  "mcpServers": {
    "lastest": {
      "command": "npx",
      "args": [
        "-y",
        "@lastest/mcp-server@latest",
        "--url",
        "https://your-lastest-instance",
        "--api-key",
        "YOUR_API_KEY"
      ]
    }
  }
}

Restart the client after editing.

Cursor

Cursor reads ~/.cursor/mcp.json. Use the same JSON shape as Claude Desktop above.

Available tools

The server exposes 24 consolidated, resource-oriented tools. Most resources use one tool with an action argument (e.g. lastest_test handles list/get/create/update/delete). Names may evolve — use the agent's "list tools" command to see the current set.

Category Tools
Repositories lastest_repo
Tests lastest_test, lastest_create_test, lastest_run_tests, lastest_heal_test
Functional areas lastest_area
Builds & runs lastest_build, lastest_status, lastest_verify
Diffs & review lastest_get_diffs, lastest_decide_diff, lastest_validate_diff, lastest_approve_layer
App fixes lastest_suggest_app_fix
Shares lastest_share, lastest_publish_share
Discovery & insight lastest_scout_url, lastest_insights, lastest_ranger, lastest_ranger_status
Setup & storage lastest_setup_script, lastest_storage_state
Onboarding lastest_quickstart, lastest_quickstart_status

All tools return a structured ToolResponse with status, summary, optional actionRequired, and details.

Authentication

The MCP server authenticates against Lastest's REST API (/api/v1/*) with a Bearer token. The same key works for the VSCode Extension API. Manage and revoke keys from Settings → Runners & API Access.

Troubleshooting

Symptom Fix
Failed to connect to Lastest at ... Check the URL is reachable from the machine running the agent and that the API key is valid.
Lastest API error 401 Token revoked or expired — generate a new one in Settings.
Tools don't appear in Claude Code Run claude mcp list; if missing, re-run claude mcp add. Restart the client.
command not found: npx Install Node.js 18+.

Local development

cd packages/mcp-server
pnpm install
pnpm dev -- --url http://localhost:3000 --api-key <key>

See also

Clone this wiki locally