@lukoweb/apitogo 0.2.57 → 0.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.js +117 -12
- package/dist/cli/worker.js +4 -1
- package/docs/cli/overview.md +9 -10
- package/docs/cli/setup.md +2 -2
- package/docs/configuration/portal.md +2 -1
- package/docs/mcp/go-live.md +44 -72
- package/docs/mcp/overview.md +39 -57
- package/docs/mcp/setup.md +169 -173
- package/docs/mcp/shape.md +77 -77
- package/docs/mcp/tools.md +52 -96
- package/package.json +1 -1
- package/src/config/v2/gateway-request.ts +5 -2
- package/src/config/v2/index.ts +1 -0
- package/src/config/v2/manifest.ts +25 -0
- package/src/config/v2/resolve.ts +5 -1
- package/src/config/v2/schema.ts +18 -5
- package/src/vite/prerender/utils.ts +89 -76
- package/src/vite/prerender/worker.ts +2 -1
package/docs/mcp/setup.md
CHANGED
|
@@ -1,173 +1,169 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Configure MCP in your agent
|
|
3
|
-
description:
|
|
4
|
-
Install and wire the APItoGo MCP server in Cursor, Claude Desktop, Claude Code, Codex, and other
|
|
5
|
-
MCP hosts.
|
|
6
|
-
sidebar_icon: plug
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
Connect **`@lukoweb/apitogo-mcp`** to your AI agent so it can shape and
|
|
10
|
-
server is the same everywhere; only the host config file changes.
|
|
11
|
-
|
|
12
|
-
## Prerequisites
|
|
13
|
-
|
|
14
|
-
- **Node.js 20+** on the machine that runs the agent
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- [Quickstart](../quickstart.md) — first shape prompt
|
|
171
|
-
- [Shape](./shape.md) — local portal iteration
|
|
172
|
-
- [Go live](./go-live.md) — publish
|
|
173
|
-
- [Tools](./tools.md) — catalog
|
|
1
|
+
---
|
|
2
|
+
title: Configure MCP in your agent
|
|
3
|
+
description:
|
|
4
|
+
Install and wire the APItoGo MCP server in Cursor, Claude Desktop, Claude Code, Codex, and other
|
|
5
|
+
MCP hosts.
|
|
6
|
+
sidebar_icon: plug
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Connect **`@lukoweb/apitogo-mcp`** to your AI agent so it can create, shape and deploy APItoGo
|
|
10
|
+
projects. The server is the same everywhere; only the host config file changes.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- **Node.js 20+** on the machine that runs the agent
|
|
15
|
+
- Signed in to APItoGo: run `npx @lukoweb/apitogo login` once in a terminal. Or give the server API
|
|
16
|
+
credentials (API key id and secret from [apitogo.com](https://apitogo.com)) in its env.
|
|
17
|
+
|
|
18
|
+
## Shared server definition
|
|
19
|
+
|
|
20
|
+
Every host launches the same stdio process:
|
|
21
|
+
|
|
22
|
+
| Field | Value |
|
|
23
|
+
| ------- | ---------------------------------------------------- |
|
|
24
|
+
| Command | `npx` |
|
|
25
|
+
| Args | `-y`, `@lukoweb/apitogo-mcp` |
|
|
26
|
+
| Env | Optional: `APITOGO_API_KEY_ID`, `APITOGO_API_SECRET` |
|
|
27
|
+
|
|
28
|
+
The tools run the `apitogo` CLI the project installed (`node_modules/@lukoweb/apitogo`), or the
|
|
29
|
+
latest one through npx in a folder without it. Optional env: `APITOGO_API_KEY_ID` and
|
|
30
|
+
`APITOGO_API_SECRET` instead of `apitogo login`, `APITOGO_API_URL`, and `APITOGO_CLI_PATH` (a local
|
|
31
|
+
doc-tool checkout, for CLI development).
|
|
32
|
+
|
|
33
|
+
The server runs the commands in the folder your host starts it in, unless a tool gets a `directory`.
|
|
34
|
+
Start it in your workspace, or tell the agent where the project is.
|
|
35
|
+
|
|
36
|
+
Never commit secrets. Prefer host env blocks or `${VAR}` expansion where the client supports it.
|
|
37
|
+
|
|
38
|
+
## Cursor
|
|
39
|
+
|
|
40
|
+
Add to `~/.cursor/mcp.json` (user) or `.cursor/mcp.json` (project):
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"apitogo": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["-y", "@lukoweb/apitogo-mcp"],
|
|
48
|
+
"env": {
|
|
49
|
+
"APITOGO_API_KEY_ID": "apk_...",
|
|
50
|
+
"APITOGO_API_SECRET": "..."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Restart Cursor (or reload MCP). Confirm the **apitogo** server is connected in MCP settings.
|
|
58
|
+
|
|
59
|
+
## Claude Desktop
|
|
60
|
+
|
|
61
|
+
Edit the Claude Desktop MCP config (same `mcpServers` shape as Cursor):
|
|
62
|
+
|
|
63
|
+
| OS | Path |
|
|
64
|
+
| ------- | ----------------------------------------------------------------- |
|
|
65
|
+
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
66
|
+
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"apitogo": {
|
|
72
|
+
"command": "npx",
|
|
73
|
+
"args": ["-y", "@lukoweb/apitogo-mcp"],
|
|
74
|
+
"env": {
|
|
75
|
+
"APITOGO_API_KEY_ID": "apk_...",
|
|
76
|
+
"APITOGO_API_SECRET": "..."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Fully quit and reopen Claude Desktop after saving.
|
|
84
|
+
|
|
85
|
+
## Claude Code
|
|
86
|
+
|
|
87
|
+
**CLI (user scope — all projects):**
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
claude mcp add --scope user --env APITOGO_API_KEY_ID=apk_... --env APITOGO_API_SECRET=... \
|
|
91
|
+
apitogo -- npx -y @lukoweb/apitogo-mcp
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Project scope** (committed `.mcp.json` — use `${VAR}` for secrets):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
claude mcp add --scope project --env APITOGO_API_KEY_ID=${APITOGO_API_KEY_ID} \
|
|
98
|
+
--env APITOGO_API_SECRET=${APITOGO_API_SECRET} \
|
|
99
|
+
apitogo -- npx -y @lukoweb/apitogo-mcp
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Or hand-edit `.mcp.json` in the project root:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"apitogo": {
|
|
108
|
+
"type": "stdio",
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["-y", "@lukoweb/apitogo-mcp"],
|
|
111
|
+
"env": {
|
|
112
|
+
"APITOGO_API_KEY_ID": "${APITOGO_API_KEY_ID}",
|
|
113
|
+
"APITOGO_API_SECRET": "${APITOGO_API_SECRET}"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
User/local scope without a project file lives in `~/.claude.json`. Start a new Claude Code session
|
|
121
|
+
after changing config. Approve project-scoped servers when prompted.
|
|
122
|
+
|
|
123
|
+
## OpenAI Codex
|
|
124
|
+
|
|
125
|
+
Edit `~/.codex/config.toml` (or project `.codex/config.toml` in a trusted project). The key must be
|
|
126
|
+
`mcp_servers` (not `mcpServers`):
|
|
127
|
+
|
|
128
|
+
```toml
|
|
129
|
+
[mcp_servers.apitogo]
|
|
130
|
+
command = "npx"
|
|
131
|
+
args = ["-y", "@lukoweb/apitogo-mcp"]
|
|
132
|
+
|
|
133
|
+
[mcp_servers.apitogo.env]
|
|
134
|
+
APITOGO_API_KEY_ID = "apk_..."
|
|
135
|
+
APITOGO_API_SECRET = "..."
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
You can also use `codex mcp add` if your Codex version supports it, then confirm the TOML entry.
|
|
139
|
+
Restart Codex / open a new session. See [Codex MCP docs](https://developers.openai.com/codex/mcp).
|
|
140
|
+
|
|
141
|
+
## Other MCP hosts
|
|
142
|
+
|
|
143
|
+
Any client that supports **stdio** MCP can run APItoGo:
|
|
144
|
+
|
|
145
|
+
1. Set command `npx`, args `["-y", "@lukoweb/apitogo-mcp"]`
|
|
146
|
+
2. Sign in with `npx @lukoweb/apitogo login`, or pass `APITOGO_API_KEY_ID` and `APITOGO_API_SECRET`
|
|
147
|
+
in the server env
|
|
148
|
+
3. Restart the host and confirm tools load
|
|
149
|
+
|
|
150
|
+
Examples: Windsurf, VS Code Copilot Chat MCP, custom MCP clients — follow that product’s “add stdio
|
|
151
|
+
server” UI and paste the same command/args/env.
|
|
152
|
+
|
|
153
|
+
## Verify
|
|
154
|
+
|
|
155
|
+
In a new agent chat:
|
|
156
|
+
|
|
157
|
+
1. Ask the agent to list the APItoGo tools: they all start with `apitogo_`, such as
|
|
158
|
+
`apitogo_create`, `apitogo_deploy` and `apitogo_status`.
|
|
159
|
+
2. Ask it for the status of your project; it calls `apitogo_status`.
|
|
160
|
+
|
|
161
|
+
If the server fails to start: confirm Node 20+ and that `npx -y @lukoweb/apitogo-mcp` works in a
|
|
162
|
+
terminal. If a tool says you are not logged in, run `npx @lukoweb/apitogo login` or check the API
|
|
163
|
+
key id and secret.
|
|
164
|
+
|
|
165
|
+
## Next
|
|
166
|
+
|
|
167
|
+
- [Shape a project](./shape.md) — make and change the project folder
|
|
168
|
+
- [Go live](./go-live.md) — deploy
|
|
169
|
+
- [Tools](./tools.md) — every tool
|
package/docs/mcp/shape.md
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Shape with MCP
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
## Next
|
|
76
|
-
|
|
77
|
-
When
|
|
1
|
+
---
|
|
2
|
+
title: Shape a project with MCP
|
|
3
|
+
description:
|
|
4
|
+
Create an APItoGo project folder and shape its portal, API and plans with the MCP tools, before
|
|
5
|
+
anything is deployed.
|
|
6
|
+
sidebar_icon: pencil-ruler
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Shaping** is everything before a deploy: making the project folder, choosing the services, and
|
|
10
|
+
setting the portal's name, the API, the docs pages and the plans. It only changes files in the
|
|
11
|
+
folder; nothing reaches the platform yet.
|
|
12
|
+
|
|
13
|
+
## Start a project
|
|
14
|
+
|
|
15
|
+
A new project with every service and a sample backend, ready to deploy:
|
|
16
|
+
|
|
17
|
+
> Create an APItoGo project called Books in `./books`.
|
|
18
|
+
|
|
19
|
+
The agent calls **`apitogo_create`** with `template: "full"`. For empty services it uses
|
|
20
|
+
`template: "blank"`, and `services` picks only some of them:
|
|
21
|
+
|
|
22
|
+
| Service | What it is |
|
|
23
|
+
| ---------- | -------------------------------------------------------- |
|
|
24
|
+
| `portal` | The developer website: landing page, docs, API reference |
|
|
25
|
+
| `gateway` | API protection: keys, rate limits, quotas |
|
|
26
|
+
| `identity` | Login for the people who use your API |
|
|
27
|
+
| `plans` | Pricing and API keys |
|
|
28
|
+
|
|
29
|
+
**An existing API repository?** The agent calls **`apitogo_init`** in that folder, then
|
|
30
|
+
**`apitogo_add`** for each service, for example a gateway in front of an API that already runs:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"service": "gateway",
|
|
35
|
+
"options": { "origin": "proxy", "url": "https://api.example.com", "spec": ["openapi.yaml"] }
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Change it
|
|
40
|
+
|
|
41
|
+
**`apitogo_config`** makes the common changes, with the flags of
|
|
42
|
+
[`apitogo config`](../configuration/make-config.mdx):
|
|
43
|
+
|
|
44
|
+
| Change | Options |
|
|
45
|
+
| --------------------------- | ----------------------------------------------------------- |
|
|
46
|
+
| Portal name | `title` |
|
|
47
|
+
| Add an OpenAPI file | `openapi` |
|
|
48
|
+
| A docs page | `pageSlug`, `pageTitle`, `pageContent` (markdown) |
|
|
49
|
+
| A plan | `planSku`, `planName`, `planPrice`, `planRate`, `planQuota` |
|
|
50
|
+
| A contact-us plan | `planSku`, `planPrice: "custom"` |
|
|
51
|
+
| Take a plan out | `removePlan` |
|
|
52
|
+
| Anything else in the config | `patch` (an object merged into `apitogo.config.json`) |
|
|
53
|
+
|
|
54
|
+
Example prompt:
|
|
55
|
+
|
|
56
|
+
> Add a Team plan at 49 USD a month with 120 calls a minute and 200,000 calls a month.
|
|
57
|
+
|
|
58
|
+
The agent sends
|
|
59
|
+
`{"planSku":"team","planName":"Team","planPrice":"49","planRate":"120/60","planQuota":"200000/30"}`.
|
|
60
|
+
|
|
61
|
+
The landing page (`apitogo/portal/landing/LandingPage.tsx`), the footer, the theme and the pages are
|
|
62
|
+
your project's files: the agent edits them directly, like any code.
|
|
63
|
+
|
|
64
|
+
Selling paid plans needs a **Starter** or **Professional** project and your Stripe keys, which you
|
|
65
|
+
set yourself; see [Plans](../configuration/plans.md) and the
|
|
66
|
+
[Stripe guide](../guides/stripe-setup.mdx).
|
|
67
|
+
|
|
68
|
+
## Check and look
|
|
69
|
+
|
|
70
|
+
- **`apitogo_check`** finds mistakes in the config and its files before a deploy. With `offline` it
|
|
71
|
+
asks the platform nothing.
|
|
72
|
+
- To see the portal locally, run `npx apitogo run` in the folder yourself; it keeps running, so it
|
|
73
|
+
is not an MCP tool.
|
|
74
|
+
|
|
75
|
+
## Next
|
|
76
|
+
|
|
77
|
+
When it looks right, [go live](./go-live.md).
|