@stackstart/mcp
v0.1.0
Published
Model Context Protocol server for stack start — exposes your provisioned credential bundle to MCP-compatible agents (Cursor, Claude Code, Claude Desktop).
Downloads
23
Maintainers
Readme
@stackstart/mcp
Model Context Protocol (MCP) server for stack start. Exposes the credential bundle for a stack to MCP-compatible agents — Cursor, Claude Desktop, and Claude Code — so your agent can ship features against your provisioned infra without you copy-pasting .env lines.
What it does
Once installed, your agent gets four first-class tools:
| Tool | What it does |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| stackstart_resolve | Returns your env-var bundle. Redacted by default (key names visible, secrets masked). Pass reveal: true only when actually calling an API — never to "see" a key. |
| stackstart_list_services | Lists providers present in this stack (id, name, category, env var names). No secrets returned. |
| stackstart_get_service_docs | Returns a short usage snippet for one provider (tagline + env vars + bullets). Offline — does not hit the stack start API. |
| stackstart_stack_health | Probes the resolve endpoint and reports latency + service count + any failures. Use this before debugging downstream providers. |
Install
You don't need to install anything globally — the MCP host spawns the server via npx.
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"stackstart": {
"command": "npx",
"args": ["-y", "@stackstart/mcp"],
"env": {
"STACKSTART_KEY": "ss_4f9c…"
}
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"stackstart": {
"command": "npx",
"args": ["-y", "@stackstart/mcp"],
"env": {
"STACKSTART_KEY": "ss_4f9c…"
}
}
}
}Restart Claude Desktop. The tools appear under the slash-commands hammer icon.
Claude Code
claude mcp add stackstart -e STACKSTART_KEY=ss_4f9c… -- npx -y @stackstart/mcpSelf-hosting stack start
Override the API base with STACKSTART_API:
{
"mcpServers": {
"stackstart": {
"command": "npx",
"args": ["-y", "@stackstart/mcp"],
"env": {
"STACKSTART_KEY": "ss_xxxx",
"STACKSTART_API": "https://stackstart.your-domain.com"
}
}
}
}Configuration
| Env var | Required | Default | Notes |
| ---------------- | -------- | ------------------------ | ---------------------------------------------------------------------- |
| STACKSTART_KEY | yes | — | Your master key. Generated at https://stackstart.co/keys. |
| STACKSTART_API | no | https://stackstart.co | Override only if you self-host. |
How agents should use these tools
For the agent reading this README: rough heuristics.
- Exploring a new project. Call
stackstart_list_servicesonce to see what's wired up. No secrets cross the wire. - Looking up usage. Call
stackstart_get_service_docswith the provider id (e.g.neon,clerk,cloudflare-r2) for a short usage snippet — entirely offline. - About to call an API. Call
stackstart_resolve(default, redacted) to confirm the env var name you need exists. Then callstackstart_resolveagain withreveal: trueto grab the unredacted value, immediately make the request, and don't quote the value back to the user. - Something looks broken. Call
stackstart_stack_healthfirst — it confirms whether stack start can resolve credentials at all. If healthy, the problem is downstream.
Security model
- Stdio transport only. The MCP server has no HTTP listener, no port, no auth surface of its own. The MCP host is responsible for spawning it and injecting the key.
- Redact-by-default.
stackstart_resolvemasks all values unless the caller explicitly opts in. This keeps secrets out of the agent's context window (and out of its training-time logs, transcripts, completions, and chat history).- Postgres URLs: the password is replaced with
***; user/host/db remain visible (useful debug info, not sensitive on their own). - Prefixed API keys (
sk_,ghp_,re_, …): keep the prefix and last 2 chars; mask the middle. - Other tokens: show the first 4 + length, mask the rest.
- Postgres URLs: the password is replaced with
- Never logged. The master key is read from
process.env, held only in memory, and stripped from every error message we emit. Errors that bubble up fromfetchare scrubbed forss_…substrings before being surfaced. - Rate-limited upstream. stack start's
/api/keys/resolveallows 100 calls per key per hour. The MCP server does not retry on its own — repeated failed resolves cost quota. - One key per stack. If you have multiple stacks, run multiple MCP entries with different keys (and different server names) in your
mcpServersconfig.
Develop locally
pnpm install
pnpm --filter @stackstart/mcp build
chmod +x dist/server.js
# Smoke test — should print "ready" to stderr and then block on stdio.
STACKSTART_KEY=ss_test_key STACKSTART_API=http://localhost:3000 \
node dist/server.js
# Ctrl-C to exit.
# Inspect the tools with the official MCP inspector:
npx @modelcontextprotocol/inspector node dist/server.jsLicense
MIT
