Menu

MCP Server

Viktor Fási

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
  • Inspect test runs and background jobs
  • Review visual diffs and approve / reject baselines
  • Heal failing tests via AI

Package

Prerequisites

  1. A running Lastest instance reachable over HTTP(S).
  2. An API key generated from the Lastest UI: Settings → Agents & 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 a tool per high-level operation. Names may evolve — use the agent's "list tools" command to see the current set. Categories:

Category Examples
Repositories list_repos, get_repo
Tests list_tests, get_test, create_test, update_test, delete_test, heal_test
Functional areas list_areas, create_area, list_tests_by_area
Builds & runs create_build, get_build, list_builds, get_run
Diffs get_diff, approve_diff, reject_diff, approve_all_diffs
Jobs get_active_jobs, get_job
Coverage get_coverage

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 → Agents & 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


Related

Wiki: API Tokens
Wiki: Home
Wiki: Remote Runners
Wiki: Settings Reference
Wiki: VSCode Extension API
Wiki: _Sidebar

MongoDB Logo MongoDB