MCP Server
tsdevstack includes a built-in Model Context Protocol (MCP) server that exposes CLI commands and project context to AI agents. This gives tools like Claude Code, Claude Desktop, Cursor, and VS Code Copilot an understanding of your project structure, service configuration, and available workflows — so they can assist you accurately instead of guessing.
Quick start
Add the MCP server to your project's .mcp.json:
Restart your AI client. The tools and resources will be available immediately.
Try it
Once the MCP server is connected, paste this read-only health-check prompt into your AI client. It exercises several query tools at once and gives you a one-shot view of your project's local config, cloud deployments, and secret drift.
Read-only audit across services, environments, and secret drift.
How it works
The MCP server is a thin wrapper around the existing CLI. Each tool spawns npx tsdevstack <command> as a child process and captures the output. There are no direct imports from other CLI packages — the MCP server is a standalone wrapper.
- Transport: stdio (the AI client spawns the server as a child process)
- No background process: The server starts when the client connects and exits when it disconnects
- Same permissions: The MCP server runs with your local credentials, same as running CLI commands manually
Tools
The server exposes 54 tools organized into query tools (read-only) and action tools (mutating).
Query tools (13)
Safe, read-only operations. No confirmation needed.
Action tools — local (14)
Low-risk operations that modify local files only.
Action tools — cloud (14)
Higher-risk operations that modify cloud infrastructure.
Action tools — setup and CI (13)
Infrastructure setup, Docker builds, and CI/CD operations.
Resources
The server exposes 12 resources that provide project context to AI agents.
Project state (dynamic)
These read files from your project and stay up-to-date:
Guides (static)
Hardcoded reference content for AI agents:
Safety model
The MCP server uses tool annotations to communicate risk to AI clients:
readOnlyHint: true— Query tools. Safe to run without confirmation.destructiveHint: true— Tools that permanently delete data (remove_service_cloud,infra_destroy, etc.). AI clients should always confirm before running these.idempotentHint: true— Tools that can be safely re-run (most generate/deploy commands).
Long-running commands like infra_deploy (30+ minutes) include a note in their description advising the AI to suggest the user runs them in their terminal instead.
Client configuration
Claude Code / VS Code
Add .mcp.json to your project root (shown above in Quick start). Claude Code picks it up automatically.
Claude Desktop
Add to your Claude Desktop MCP settings:
Cursor
Cursor supports MCP servers via its settings. Add the same command configuration in Cursor's MCP server settings.