|
1 | | -# @instant/mcp |
| 1 | +# @instanode/mcp |
2 | 2 |
|
3 | | -MCP server for [instanode.dev](https://instanode.dev) — lets AI agents (Claude Code, etc.) provision databases, caches, queues, storage, webhooks, and deployments without any human input. |
| 3 | +MCP server for [instanode.dev](https://instanode.dev). Lets AI coding agents |
| 4 | +(Claude Code, Cursor, Windsurf, Continue, etc.) provision ephemeral Postgres |
| 5 | +databases and webhook receivers over HTTPS — no Docker, no signup required |
| 6 | +for the free tier. |
| 7 | + |
| 8 | +- One tool call → one `postgres://` URL, usable immediately as `DATABASE_URL`. |
| 9 | +- pgvector is pre-installed on every database. |
| 10 | +- Free tier: 10 MB / 2 conn / 24h TTL. Paid (optional): 500 MB / 5 conn / |
| 11 | + permanent, unlocked by setting `INSTANODE_TOKEN`. |
4 | 12 |
|
5 | 13 | ## Install |
6 | 14 |
|
7 | | -Add to your Claude Code settings (`~/.claude/settings.json`): |
| 15 | +### Claude Code |
| 16 | + |
| 17 | +```bash |
| 18 | +claude mcp add instanode -- npx -y @instanode/mcp@latest |
| 19 | +``` |
| 20 | + |
| 21 | +To authenticate (unlock paid tier, `list_resources`, `delete_resource`): |
| 22 | + |
| 23 | +```bash |
| 24 | +claude mcp add instanode \ |
| 25 | + --env INSTANODE_TOKEN=<paste from https://instanode.dev/dashboard> \ |
| 26 | + -- npx -y @instanode/mcp@latest |
| 27 | +``` |
| 28 | + |
| 29 | +### Cursor |
| 30 | + |
| 31 | +Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global): |
8 | 32 |
|
9 | 33 | ```json |
10 | 34 | { |
11 | 35 | "mcpServers": { |
12 | | - "instant": { |
| 36 | + "instanode": { |
13 | 37 | "command": "npx", |
14 | | - "args": ["@instant/mcp"] |
| 38 | + "args": ["-y", "@instanode/mcp@latest"], |
| 39 | + "env": { |
| 40 | + "INSTANODE_TOKEN": "<optional — paste from dashboard for paid tier>" |
| 41 | + } |
15 | 42 | } |
16 | 43 | } |
17 | 44 | } |
18 | 45 | ``` |
19 | 46 |
|
20 | | -That's it. No account required to start. |
| 47 | +### Windsurf |
21 | 48 |
|
22 | | -## Tools |
| 49 | +Add to `~/.codeium/windsurf/mcp_config.json`: |
23 | 50 |
|
24 | | -### `list_my_resources` |
25 | | - |
26 | | -List all instanode.dev resources for the authenticated team. |
27 | | - |
28 | | -Requires `INSTANT_API_KEY` in the environment. Without a key, returns instructions for signing up. |
29 | | - |
30 | | -### `provision_database` |
31 | | - |
32 | | -Provision a PostgreSQL database (with pgvector). |
33 | | - |
34 | | -### `provision_cache` |
35 | | - |
36 | | -Provision a Redis cache instance. |
37 | | - |
38 | | -### `provision_document_db` |
39 | | - |
40 | | -Provision a MongoDB document database. |
41 | | - |
42 | | -### `provision_queue` |
43 | | - |
44 | | -Provision a NATS JetStream queue. |
| 51 | +```json |
| 52 | +{ |
| 53 | + "mcpServers": { |
| 54 | + "instanode": { |
| 55 | + "command": "npx", |
| 56 | + "args": ["-y", "@instanode/mcp@latest"], |
| 57 | + "env": { |
| 58 | + "INSTANODE_TOKEN": "<optional>" |
| 59 | + } |
| 60 | + } |
| 61 | + } |
| 62 | +} |
| 63 | +``` |
45 | 64 |
|
46 | | -### `provision_storage` |
| 65 | +### Continue.dev |
47 | 66 |
|
48 | | -Provision S3-compatible object storage. |
| 67 | +Add to your `~/.continue/config.yaml`: |
49 | 68 |
|
50 | | -### `provision_webhook` |
| 69 | +```yaml |
| 70 | +mcpServers: |
| 71 | + - name: instanode |
| 72 | + command: npx |
| 73 | + args: ["-y", "@instanode/mcp@latest"] |
| 74 | + env: |
| 75 | + INSTANODE_TOKEN: "<optional>" |
| 76 | +``` |
51 | 77 |
|
52 | | -Provision a webhook receiver URL. |
| 78 | +For a drop-in `CLAUDE.md` / `.cursorrules` that tells the agent exactly when |
| 79 | +to reach for this MCP, see <https://instanode.dev/agent.html>. |
53 | 80 |
|
54 | | -### `deploy_app` |
| 81 | +## Environment |
55 | 82 |
|
56 | | -Deploy a containerized app from a directory containing a Dockerfile. |
| 83 | +| Variable | Required | Default | Purpose | |
| 84 | +|---------------------|----------|--------------------------------|-------------------------------------------------------------------------------------------------------------| |
| 85 | +| `INSTANODE_TOKEN` | No | — | Bearer JWT minted at <https://instanode.dev/dashboard>. Required for `list_resources`, `claim_token`, `delete_resource`, `get_api_token`. Unlocks paid-tier limits on `create_*`. | |
| 86 | +| `INSTANODE_API_URL` | No | `https://api.instanode.dev` | Override the API base URL. Only set this for local development. | |
57 | 87 |
|
58 | | -### `deploy_stack` |
| 88 | +## Tools |
59 | 89 |
|
60 | | -Deploy a multi-service stack from an `instant.yaml` manifest. |
| 90 | +| Tool | Description | |
| 91 | +|-------------------|---------------------------------------------------------------------------------------------------| |
| 92 | +| `create_postgres` | Provision a Postgres database (pgvector included). Returns a `postgres://` URL. `name` required. | |
| 93 | +| `create_webhook` | Provision an inbound webhook receiver URL. `name` required. | |
| 94 | +| `list_resources` | List resources on the caller's account. Requires `INSTANODE_TOKEN`. | |
| 95 | +| `claim_token` | Attach an anonymous token to the authenticated account. Requires `INSTANODE_TOKEN`. | |
| 96 | +| `delete_resource` | Hard-delete a resource you own. Paid tier only. Requires `INSTANODE_TOKEN`. | |
| 97 | +| `get_api_token` | Mint a fresh 30-day bearer JWT (for rotation). Requires an existing `INSTANODE_TOKEN`. | |
| 98 | + |
| 99 | +## Example agent interactions |
| 100 | + |
| 101 | +### 1. "I need a Postgres for this project" |
| 102 | + |
| 103 | +> **You:** Claude, I need a Postgres database for this project. |
| 104 | +> |
| 105 | +> **Claude:** *calls* `create_postgres({ name: "my-side-project" })` |
| 106 | +> |
| 107 | +> Returns a `connection_url` like `postgres://usr_a1b2:...@pg.instanode.dev:5432/db_a1b2?sslmode=require`. |
| 108 | +> |
| 109 | +> **Claude then:** writes `DATABASE_URL=...` to `.env`, adds `.env` to |
| 110 | +> `.gitignore`, runs your migrations. |
| 111 | + |
| 112 | +### 2. "Set up a webhook to catch Stripe events" |
| 113 | + |
| 114 | +> **You:** Give me a webhook URL I can point Stripe at. |
| 115 | +> |
| 116 | +> **Claude:** *calls* `create_webhook({ name: "stripe-sandbox" })` |
| 117 | +> |
| 118 | +> Returns a `receive_url` that captures every request. `curl $receive_url` |
| 119 | +> pulls back the stored log. |
| 120 | + |
| 121 | +### 3. "Make last night's database permanent" |
| 122 | + |
| 123 | +> **You:** I want to keep the database you made yesterday past 24h. |
| 124 | +> |
| 125 | +> **Claude:** *(with `INSTANODE_TOKEN` set)* *calls* |
| 126 | +> `claim_token({ token: "a1b2c3d4-..." })` → resource is now linked to your |
| 127 | +> account with `tier=paid` and no expiry. |
61 | 128 |
|
62 | 129 | ## Authentication |
63 | 130 |
|
64 | | -Set `INSTANT_API_KEY` to use authenticated features (permanent resources, `list_my_resources`): |
| 131 | +The free tier works without any setup. To unlock permanent resources, paid |
| 132 | +limits, and the `list_resources` / `delete_resource` tools: |
65 | 133 |
|
66 | | -```json |
67 | | -{ |
68 | | - "mcpServers": { |
69 | | - "instant": { |
70 | | - "command": "npx", |
71 | | - "args": ["@instant/mcp"], |
72 | | - "env": { |
73 | | - "INSTANT_API_KEY": "inst_live_..." |
74 | | - } |
75 | | - } |
76 | | - } |
77 | | -} |
78 | | -``` |
| 134 | +1. Sign up at <https://instanode.dev> with GitHub. |
| 135 | +2. Visit the dashboard and copy your bearer token. |
| 136 | +3. Set it as `INSTANODE_TOKEN` in the MCP server's `env` block (see examples |
| 137 | + above). |
79 | 138 |
|
80 | | -Without a key, anonymous provisions expire after 24h. Sign up at [instanode.dev/start](https://instanode.dev/start) to claim them permanently. |
| 139 | +Rotate any time by calling `get_api_token`, which mints a fresh 30-day JWT. |
81 | 140 |
|
82 | 141 | ## Development |
83 | 142 |
|
84 | 143 | ```bash |
85 | | -# Install |
86 | 144 | npm install |
87 | | - |
88 | | -# Build |
89 | 145 | npm run build |
90 | | - |
91 | | -# Test (requires a running instanode.dev server) |
92 | | -INSTANT_API_URL=http://localhost:32108 bash test.sh |
| 146 | +# Integration test (optional — requires a running instanode.dev server): |
| 147 | +INSTANODE_API_URL=http://localhost:30080 npm test |
93 | 148 | ``` |
| 149 | + |
| 150 | +## License |
| 151 | + |
| 152 | +MIT — (c) instanode.dev |
0 commit comments