stackgen-mcp-server 0.1.1
Install from the command line:
Learn more about npm packages
$ npm install @appcd-dev/stackgen-mcp-server@0.1.1
Install via package.json:
"@appcd-dev/stackgen-mcp-server": "0.1.1"
About this version
MCP (Model Context Protocol) server for StackGen APIs. Enables AI agents (Cursor, Claude Desktop, etc.) to interact with StackGen services.
Add to your MCP config (.cursor/mcp.json or Claude Desktop config):
{
"mcpServers": {
"stackgen": {
"command": "npx",
"args": ["-y", "@appcd-dev/stackgen-mcp-server"],
"env": {
"STACKGEN_API_BASE_URL": "https://api.stackgen.com",
"STACKGEN_BEARER_TOKEN": "your_token_here"
}
}
}
}Restart your client and the tools will be available.
STACKGEN_API_BASE_URL=https://api.stackgen.com \
STACKGEN_BEARER_TOKEN=your_token \
npx -y @appcd-dev/stackgen-mcp-server --sseOpen http://localhost:3000 for the test UI, or connect to http://localhost:3000/sse.
- 314 Auto-generated Tools from OpenAPI specs
- Dual Transport: stdio (default) for MCP clients, SSE for web
- Zero Config: Works out of the box with npx
| API | Tools | Path Prefix |
|---|---|---|
| Appcd | 93 | /appcd/api |
| Terraform Module Service | 12 | /tf-module |
| Topology | 209 | /iac-gen |
| Variable | Required | Description |
|---|---|---|
STACKGEN_API_BASE_URL |
Yes | StackGen API base URL |
STACKGEN_BEARER_TOKEN |
Yes | Authentication token |
PORT |
No | Server port (default: 3000, SSE mode only) |
MCP_TRANSPORT |
No | Transport type: stdio or sse
|
| Mode | Flag | Use Case |
|---|---|---|
| stdio (default) | --stdio |
MCP clients (Cursor, Claude Desktop) |
| sse | --sse |
Web browser, MCP Inspector |
# stdio mode (default) - for MCP clients
npx -y @appcd-dev/stackgen-mcp-server
# SSE mode - for web/testing
npx -y @appcd-dev/stackgen-mcp-server --sseWhen running in SSE mode:
| Endpoint | Description |
|---|---|
http://localhost:3000/ |
Web test client UI |
http://localhost:3000/sse |
SSE connection endpoint |
http://localhost:3000/health |
Health check |
# Clone and install
git clone https://github.com/appcd-dev/stackgen-api-client.git
cd stackgen-api-client/packages/stackgen-mcp-server
pnpm install
# Generate tools and build
make rebuild
# Run locally
make dev # Development mode
make start # Production modeEdit spec-configs.json:
{
"name": "NewAPI",
"specPath": "../../api-specs/new-api.yml",
"outputFile": "../src/tools/generated/new-api.ts",
"pathPrefix": "/new-api"
}Then run make rebuild.
| Command | Description |
|---|---|
make generate |
Generate tools from OpenAPI specs |
make build |
Build TypeScript |
make rebuild |
Clean + generate + build |
make dev |
Run in dev mode |
make start |
Run production server |
# Start server in SSE mode
npx -y @appcd-dev/stackgen-mcp-server --sse
# In another terminal
npx @modelcontextprotocol/inspector
# Connect to http://localhost:3000/ssePrivate - StackGen