lattice-mcp
The lattice-mcp server provides direct, typed access to the Lattice container orchestration platform, with 133 tools to monitor and manage the entire infrastructure. Key capabilities:
Fleet overview and health – Retrieve fleet-wide status, API health, version info, and detect anomalies like restart loops, unhealthy containers, or offline workers.
Worker management – List, inspect, reboot, upgrade workers; start/stop all containers on a worker; view CPU/memory/disk/network metrics; register and delete workers.
Stack lifecycle – Create, deploy, update, export/import stacks; manage compose YAML; save as templates; approve deployments.
Container operations – Full lifecycle: start, stop, restart, kill, pause, unpause, remove, recreate containers; view logs, events, and per-container metrics.
Deployment management – List, inspect, rollback deployments; view deployment logs; approve pending deployments; manage CI deploy tokens.
Databases – Provision and manage MySQL, MariaDB, PostgreSQL instances; start/stop/restart database containers; create/restore/delete snapshots; view credentials (audited), logs, and events; open interactive SQL console.
Backup destinations – Configure, test, and manage backup targets (e.g., S3) for database snapshots.
Container registries – Add, update, delete, and test registries; browse repositories and image tags for deployable versions.
Networking and volumes – Create, list, and delete Docker networks and volumes on workers.
Environment variables and templates – Manage global environment variables (with secret masking) and stack templates.
API and deploy tokens – Create, list, delete API tokens and CI deploy tokens.
Audit and security – Search audit logs by user/action/resource; manage users, SSO/SMTP, notifications; secrets and tokens automatically masked (override with
LATTICE_ALLOW_SECRET_VALUES=1).Webhooks – Create, update, delete, and test outbound event webhooks.
Self-update – Trigger lattice-api and lattice-web container updates.
Search and discovery – Search across workers, stacks, and containers by name; aggregated fleet metrics; runner version drift.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lattice-mcpList all stacks with their status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lattice-mcp
Model Context Protocol server for Lattice, the container orchestration platform that runs every appleby.cloud service. Gives Claude Code direct, typed access to workers, stacks, containers, deployments, databases, registries, networks, volumes and instance configuration.
appleby.cloud platform · MCP server · published to npm as
lattice-mcp· consumed vianpx -y lattice-mcp
Overview
lattice-mcp is a single-file Node ESM program (index.js) that speaks MCP over stdio and translates tool calls into HTTP requests against the lattice-api admin surface. It exposes 136 typed tools and holds no business logic, caching or state of its own — every behaviour (pagination, validation, side effects) comes from lattice-api.
Once configured, ask Claude Code things like:
"What's the status of all stacks?"
"Show me logs for the forta-api container"
"Which containers are unhealthy?" (
lattice_get_anomaliesis the best first call)"Deploy stack 5" / "Rollback the last deployment on stack 12"
"What image tags can I deploy from the registry?"
Related MCP server: Claude Orchestrator MCP
Role in the appleby.cloud ecosystem
Repo | Relationship |
The API this wraps — its route table is the source of truth for tool coverage. | |
Next.js dashboard over the same API. | |
Agent on each worker VM; WebSocket back to | |
| Sibling MCP servers, same single-file structure. |
Tech stack
Node ≥18 (needs global
fetchandAbortSignal.timeout), ESM ("type": "module").@modelcontextprotocol/sdk^1.29.0 —McpServer+StdioServerTransport.zod^4.4.3 for argument schemas (a declared dependency as of 1.1.1).No build step, no bundler.
node --check index.jsis the only static gate.
Getting started
Prerequisites
Node ≥18.
A Lattice API URL and API token. Generate a token from the Lattice web dashboard under Settings > API Tokens.
Setup
Quickest — interactive setup writes the lattice block into ~/.mcp.json:
npx lattice-mcp --setupOr configure it manually in ~/.mcp.json:
{
"mcpServers": {
"lattice": {
"command": "npx",
"args": ["-y", "lattice-mcp"],
"env": {
"LATTICE_API_URL": "https://lattice-api.appleby.cloud",
"LATTICE_API_TOKEN": "your-api-token"
}
}
}
}Restart Claude Code after setup so the new server and tools are picked up.
Environment variables
Variable | Required | Description |
| Yes | Lattice API base URL |
| Yes | Bearer token for authentication (sent on every request) |
| No | Set to |
Secret values are masked
Every response is passed through a masking step before it reaches the model. Anything that looks
like a credential keeps its first two characters and loses the rest to a fixed-width tail —
supersecret becomes su**********.
That is enough to tell two credentials apart, or to confirm a rotation actually changed something, and not enough to use. The tail is a fixed width so the mask does not reveal the real length.
This covers container and stack env_vars, compose_yaml environment blocks, global env vars
flagged is_secret, database passwords, and freshly minted deploy/worker/API tokens. Variable
names are left readable — they are the useful half — as are addresses like TOKEN_URL and
AUTH_URL.
This server authenticates as a Lattice admin, and the API only masks global env vars
server-side for non-admin callers. Without this step, lattice_list_env_vars returns every
secret value in plaintext.
Set LATTICE_ALLOW_SECRET_VALUES=1 to turn masking off if you genuinely need a working value.
Development
Command | What it does |
| Interactive setup — writes the |
| Install dependencies (not vendored) |
| Syntax gate — the only static check that exists |
| Run the server on stdio |
| Confirm the tool count (should be 136) |
| Publish to npm — this is deployment (requires 2FA passkey from an interactive terminal) |
Tools
All 136 tools, grouped as they appear in index.js. ⚠️ marks destructive tools; their descriptions state the blast radius.
Overview & health
Tool | Description |
| Fleet overview — worker/stack/container counts, failed stacks, CPU/memory |
| API health and database connectivity |
| Deployed lattice-api version string — check deploy drift against GitHub tags |
Workers
Tool | Description |
| List workers with status, IP, versions, heartbeat |
| Detailed worker info including metrics |
| CPU, memory, disk, network metrics |
| Reboot a worker machine |
| Upgrade worker runner to latest |
| Stop all containers on a worker |
| Start all containers on a worker |
Stacks
Tool | Description |
| List stacks with status and worker assignment |
| Full stack details including compose YAML |
| Deploy a stack (all or specific containers) |
| Restart all containers in a stack |
| Stop all containers in a stack |
| Start all containers in a stack |
| Update stack configuration |
Containers
Tool | Description |
| List containers with status, image, ports, health |
| Full container details |
| Recent container logs (stdout/stderr); |
| Lifecycle events (start, stop, health changes) |
| Start a stopped container |
| Stop a running container |
| Restart a container |
| Force kill a container |
| Pause a running container |
| Unpause a paused container |
| Remove a container ⚠️ |
| Remove and recreate a container ⚠️ |
Deployments
Tool | Description |
| List deployments with status and timing |
| Deployment details with container-level status |
| Pull, create, start, swap events with timing |
| Rollback to previous state ⚠️ |
Instance self-update
Tool | Description |
| Trigger the Lattice API container to self-update |
| Trigger the Lattice web container to update |
Audit & API tokens
Tool | Description |
| Audit log entries (who did what, when); filter by |
| List API tokens |
| Create a new API token |
| Delete an API token ⚠️ |
Database instances
Tool | Description |
| List managed databases (filter by worker, engine, status) |
| Full instance config |
| Provision mysql/mariadb/postgres on a worker (omit |
| Update config, limits, snapshot schedule |
| Destroy an instance and its data volume ⚠️ — async; |
| start / stop / restart / remove ⚠️ — |
| Host, port, database and username — no secrets |
| Reveal live credentials (audited; root only on request) |
| Deprecated — root credentials via GET; use the reveal tool |
| Lifecycle history — start here when a database looks wrong |
| 3-2-1 standing — copies, media, off-site, with warnings |
| Scheduled snapshot attempts, including skipped slots and why |
| CPU/memory samples for a database (no containers-table row needed) |
| Container stdout/stderr |
| Worker lifecycle messages, incl. why a create failed |
| Authorise an interactive SQL console session |
| Snapshots for an instance |
| Take a snapshot now |
| Restore from a snapshot ⚠️ |
| Delete a snapshot and its remote file ⚠️ |
Worker port allocation
Tool | Description |
| Claimed host ports on a worker, plus a free suggestion |
Backup destinations
Tool | Description |
| List backup destinations |
| One destination's configuration |
| Create a destination |
| Update a destination |
| Delete a destination ⚠️ |
| Test connectivity without writing a backup (requires a connected |
Registries
Tool | Description |
| Configured container registries |
| Add a registry |
| Update a registry |
| Delete a registry ⚠️ |
| Test a saved registry's stored credentials |
| Test registry credentials before saving |
| What images exist |
| What versions are deployable |
Discovery & diagnostics
Tool | Description |
| Search workers, stacks and containers in one call |
| Restart loops, unhealthy containers, offline workers — best first call |
| Aggregated fleet CPU/memory/disk/network |
| Runner versions and what's outdated |
| Re-poll every worker for its current runner version |
| Per-container metrics over time |
| Which user the token authenticates as |
Stacks — lifecycle, compose & deploy tokens
Tool | Description |
| Create an empty stack |
| Delete a stack and all its containers ⚠️ |
| Containers in a stack |
| Replace a stack's compose YAML |
| Reconcile container records against stored compose YAML |
| Create a stack from compose YAML |
| Export a stack's full definition as portable JSON |
| Recreate a stack from an export document |
| Save a stack as a reusable template |
| CI deploy tokens — |
| Create a CI deploy token |
| Delete a CI deploy token ⚠️ |
| Approve a deployment awaiting approval |
Container definitions
Tool | Description |
| Add a container definition to a stack |
| Update a container definition |
| Delete definition and its running container ⚠️ |
Workers — registration, tokens, volumes, networks
Tool | Description |
| Register a worker |
| Update a worker's name, hostname, IP, status, labels |
| Delete a worker ⚠️ |
| Live per-container stats from one worker |
| Worker registration tokens |
| Create a registration token for a worker |
| Delete a worker token ⚠️ |
| Docker volumes on a worker |
| Create a Docker volume on a worker |
| Delete a Docker volume ⚠️ |
| Docker networks on a worker |
| Create a Docker network on a worker |
| Delete a Docker network ⚠️ |
| Every tracked network across the fleet |
| Delete a tracked network by Lattice ID ⚠️ |
| Force-remove a wedged container ⚠️ |
Env vars, templates & webhooks
Tool | Description |
| Global |
| Create a global environment variable |
| Update a global environment variable |
| Delete a global environment variable ⚠️ |
| Saved stack templates |
| Create a stack template |
| Delete a stack template ⚠️ |
| Outbound event webhooks |
| Create an outbound webhook |
| Update a webhook |
| Delete a webhook ⚠️ |
| Send a test payload to a webhook |
Users & instance configuration
Tool | Description |
| List Lattice users with roles and status |
| Create a local Lattice user |
| Update a user's name, role or active flag ⚠️ |
| Delete a Lattice user ⚠️ |
| Get the Forta SSO configuration |
| Update SSO config ⚠️ (can lock out SSO users) |
| Get the SMTP configuration |
| Update the SMTP configuration |
| Send a test email with the saved SMTP config |
| Per-event notification preferences |
| Update notification preferences |
Project structure
Everything lives in one file:
Path | Role |
| The whole server: |
| npm metadata; |
| Contributor/agent guide — conventions, handler contracts, verification. |
| This file. |
Deployment
Published to npm as lattice-mcp (public). Consumers run npx -y lattice-mcp, which resolves the latest published version — so publishing is deployment, and a running MCP server must be restarted to pick up a new version. npm publish requires 2FA via passkey from an interactive terminal.
Contributing & further reading
Read AGENTS.md before changing code — it documents the one-shape tool pattern, the body()/api() helpers, the "read the handler before adding a tool" rule, and the verification steps. Related repos: lattice-api, lattice-web, lattice-runner.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server for managing Modal — apps, containers, volumes, and secrets — and for deploying & running Modal apps directly from Claude Code and other MCP clients.26MIT
- Flicense-qualityDmaintenanceAn MCP server for coordinating multiple Claude Code sessions across related projects.
- Alicense-qualityDmaintenanceMCP server that enables Claude Code to communicate with other Claude Code agents over HTTP, allowing users to ask questions about remote codebases or delegate coding tasks.MIT
- Alicense-qualityDmaintenanceAn MCP server that exposes the Lattice Talent API as tools, enabling AI assistants like Claude to read and manage people data, goals, feedback, reviews, and more.46MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aidenappl/lattice-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server