@archbee/mcp 2.7.0 → 3.0.0

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/README.md CHANGED
@@ -1,274 +1,87 @@
1
- # Archbee CMS MCP Server
1
+ # Archbee MCP
2
2
 
3
- A Model Context Protocol (MCP) server for the [Archbee API](https://docs.archbee.com/get-document). It lets an LLM client read, search, create, update and delete the documentation in your Archbee space.
3
+ Connects an MCP client that can only start a local stdio server to Archbee's hosted MCP server. The package has no tools of its own: it forwards every message to Archbee over HTTP, so the tools are always the ones Archbee serves today.
4
4
 
5
- With a space API key every tool acts on that one space, and `docSpaceId` never has to be passed in. With a team key (`abteam_…`) the assistant reaches every space in the team, and the space-level tools take a `docSpaceId` argument per call.
5
+ **Most clients do not need this package.** Claude, ChatGPT, Cursor and VS Code connect to a URL directly:
6
6
 
7
- ### Tools
7
+ | You want | Connect to |
8
+ | -------- | ---------- |
9
+ | Read and write your organization's docs | `https://api.archbee.com/mcp` (sign in with OAuth, or send an API key) |
10
+ | Read one public docs site | `https://<your-docs-site>/mcp`, no login. The site's `/.well-known/mcp.json` names it too |
8
11
 
9
- Every create tool returns the new resource's id as `id`, so one call's result feeds the next (`create_category`'s `id` is the `parentDocId` of `create_doc`).
10
-
11
- Read:
12
-
13
- 1. `get_doc`
14
- - Gets content of a document
15
- - Input:
16
- - `docId` (string): Archbee document id
17
- - Returns: content as markdown; each embedded content snippet appears as a `:::ContentSnippet{docRefId="…"}` block, which `create_doc` and `update_doc` accept back; `list_content_snippets` returns its text by that id
18
- 2. `get_all_docs`
19
- - Gets content of all documents in the space
20
- - Returns: documents, as `DocResponse[]`
21
- 3. `search_query`
22
- - Searches docs by content; an empty query returns all docs
23
- - Input:
24
- - `query` (string): text to look for inside documents
25
- - Returns: documents containing the query, as `DocResponse[]`
26
- 4. `search_title`
27
- - Searches docs by title
28
- - Input:
29
- - `query` (string): text to look for in titles
30
- - Returns: documents with a matching title, as `DocResponse[]`
31
-
32
- Write — these need an API key, space or team (the configurations below):
33
-
34
- 5. `create_doc`
35
- - Creates a document from Markdown or MDX content
36
- - Input:
37
- - `content` (string): body as Markdown or MDX text
38
- - `format` (`markdown` | `mdx`, optional): use `mdx` for JSX-style components such as `<hint>` or `<Tabs>`; directive-style (`:::hint{type="info"}`) works in both. Defaults to `markdown`
39
- - also optional: `title`, `parentDocId`, `slug`, `description`, `previewImgURL`, `hidden`, `icon`
40
- - Returns: `id`, the new document's id
41
- 6. `update_doc`
42
- - Updates a document; only the fields you send are changed
43
- - Input:
44
- - `docId` (string): document to update
45
- - optional: `content`, `format`, `title`, `parentDocId`, `slug`, `description`, `previewImgURL`, `hidden`, `icon`
46
- - Returns: `id`, the document's id, also when the change went to a draft or a branch
47
- 7. `delete_doc`
48
- - Permanently deletes a document, its uploaded files and images. Cannot be undone
49
- - Input:
50
- - `docId` (string): document to delete
51
- - `recursive` (boolean, optional): required to delete a document that has nested children, which deletes them too
52
- 8. `create_doc_space`
53
- - Creates a doc space in the team
54
- - Input:
55
- - `name` (string): name of the new space
56
- - optional: `isReviewSystemEnabled`, `isBranchingSystemEnabled`, `docSpaceGroupId`, `icon`
57
- - at most one of the two review flags, and either needs the Scaling plan or higher
58
- - Returns: `id`, the new space's id
59
- 9. `update_doc_space`
60
- - Updates settings of the configured space; only the parts you send are changed
61
- - Input, all optional:
62
- - `name` (string): renames the space
63
- - `icon` (string): left-nav icon
64
- - `hostnamePart` (`{ hostname, hostnamePath }`): custom hostname configuration
65
- - `spaceLinks` (`{ label, docSpaceId }[]`): links to other spaces; the list should start with the current space
66
- - `publicAccessControlPart`: public access control and authentication configuration
67
- - `editMode` (`free_edits`, `drafts_reviews` or `branches_reviews`): switches the edit mode as in the space settings. Needs a team admin; the review modes need the Scaling plan or higher
68
- - `confirmDeletion` (boolean): leaving Drafts & Reviews deletes every draft and leaving Branches & Reviews deletes every branch. Warn the user first and send `true` once they agree; without it such a switch is refused and nothing changes
69
- 10. `delete_doc_space`
70
- - Permanently deletes the configured space and every document in it. Cannot be undone, and the `API_KEY` dies with it
71
- 11. `create_space_group`
72
- - Creates a space group. Requires a team admin
73
- - Input:
74
- - `name` (string): name of the new group
75
- - optional: `isAiEnabled`, `isReviewSystemEnabled`, `isBranchingSystemEnabled`
76
- - Returns: `id`, the new group's id
77
- 12. `delete_space_group`
78
- - Deletes an empty space group. Requires a team admin
79
- - Input:
80
- - `docSpaceGroupId` (string): group to delete
81
- 13. `list_space_groups`
82
- - Lists every space group with the doc spaces in it, each with its id and name. Use it to
83
- discover a `docSpaceId` before calling a space-level tool. Requires a team key
84
- - Input:
85
- - `query` (string, optional): case-insensitive filter on space group and space names
86
- 14. `whoami`
87
- - Shows who the API key acts as. Works with a team key or a space key
88
- - Returns: `user` (`id`, `name`, `email`), `team` (`id`, `name`, `plan`), `spaceCount`,
89
- `spaceLimit`, and for a space key `docSpace` (`id`, `name`), the space it is bound to
90
- 15. `create_category`
91
- - Creates a category (a folder in the space navigation)
92
- - Input:
93
- - `categoryName` (string): name of the category
94
- - `parentDocId` (string, optional): node to nest it under
95
- - Returns: `id`, the new category's id (a `parentDocId` for `create_doc`)
96
- 16. `delete_category`
97
- - Deletes an empty category. Documents are never deleted
98
- - Input:
99
- - `categoryId` (string): category to delete
100
-
101
- An `icon` is either an emoji (`"🚀"`), or a JSON string naming an icon:
102
- `{"lucideIcon":"Rocket"}`, `{"faIcon":"fa-solid fa-rocket"}` or `{"apiMethod":"GET"}`.
103
- An empty string clears it; anything else is rejected.
104
-
105
- Reusable resources — templates, content snippets and variables belong to the organization, not to a
106
- space, so these take no `docSpaceId`. The `list_*` tools work with either key; the rest need a team key:
107
-
108
- 17. `list_templates`
109
- - Lists the saved document templates, with their content as markdown
110
- 18. `create_template`
111
- - Saves a new document template. A taken name (case-insensitive) returns the existing
112
- template's id with `alreadyExists: true` instead of creating a duplicate — the existing
113
- content is kept, so a different body needs a new name
114
- - Input:
115
- - `name` (string): name of the template
116
- - optional: `content`, `format`, `icon`
117
- - Returns: `id`, the template's id
118
- 19. `apply_template`
119
- - Creates a document from a template, copying its content verbatim
120
- - Input:
121
- - `templateId` (string): template to apply
122
- - optional: `title` (defaults to the template name), `parentDocId`, `slug`, `icon`
123
- - Returns: `id`, the new document's id
124
- 20. `delete_template`
125
- - Deletes a template by moving it to the organization's Archives space, where a person can restore it
126
- - Input:
127
- - `templateId` (string): template to delete
128
- 21. `list_content_snippets`
129
- - Lists the reusable content snippets, with their content as markdown
130
- 22. `create_content_snippet`
131
- - Creates a content snippet. Requires a Scaling or Enterprise subscription. A taken name
132
- (case-insensitive) returns the existing snippet's id with `alreadyExists: true` instead of
133
- creating a duplicate — the existing content is kept, use `update_content_snippet` to change it
134
- - Input:
135
- - `name` (string): name of the snippet
136
- - optional: `content`, `format`
137
- - Returns: `id`, the snippet's id
138
- 23. `update_content_snippet`
139
- - Renames a snippet, replaces its content, or both — reaching every document that embeds it
140
- - Input:
141
- - `snippetId` (string): snippet to update
142
- - at least one of: `name`, `content` (plus optional `format`)
143
- - Returns: `id`, the snippet's id
144
- 24. `delete_content_snippet`
145
- - Permanently deletes a content snippet. Cannot be undone
146
- - Input:
147
- - `snippetId` (string): snippet to delete
148
- 25. `list_variables`
149
- - Lists the content variables and glossary terms, with their values and overrides
150
- - Input:
151
- - `variableType` (`variable` | `glossary`, optional): omit for both
152
- 26. `create_variable`
153
- - Creates a content variable or glossary term. Requires a Scaling or Enterprise subscription
154
- - Input:
155
- - `name` (string): how documents reference it (`{{name}}`); unique within its type, letters,
156
- digits, `-`, `_` and `.` only, max 40 characters. Readers never see it in the glossary
157
- - `variableContent` (string): value it resolves to (max 100 characters). For a glossary term
158
- this is the TERM readers see (max 40 characters)
159
- - optional: `description` (max 250 characters; for a glossary term this is the DEFINITION
160
- readers see, and it is required), `variableType`, `spaceTargetMap` (per-space or
161
- per-language overrides)
162
- - Returns: `id`, the new variable's id
163
- 27. `update_variable`
164
- - Updates a variable or glossary term; only the fields you send are changed
165
- - Input:
166
- - `variableId` (string): variable to update
167
- - at least one of: `name`, `variableContent`, `description`, `variableType`, `spaceTargetMap`
168
- (same field roles and limits as `create_variable`)
169
- - Returns: `id`, the variable's id
170
- 28. `delete_variable`
171
- - Permanently deletes a variable or glossary term. References to it stop resolving
172
- - Input:
173
- - `variableId` (string): variable to delete
12
+ Use `@archbee/mcp` when your client takes a `command` instead of a `url`.
174
13
 
175
14
  ## Setup
176
15
 
177
- Add this server to your `claude_desktop_config.json` or `.cursor/mcp.json`
178
-
179
- ### Environment Variables - public portal
16
+ Add one of these to your client's MCP configuration (`claude_desktop_config.json`, `.cursor/mcp.json`, ...).
180
17
 
181
- Read-only, as the Archbee Portal MCP, no API key. Use this for a published space with no access control (no password, jwt etc).
18
+ ### Organization API key: read and write every space
182
19
 
183
- - `SPACE_ID`: Id of the published space, starting with `PUBLISHED-`
184
-
185
- Copy it from your portal's `/.well-known/mcp.json`, e.g. `https://docs.customer.com/.well-known/mcp.json` (`docs.customer.com` is an example, use your own portal's address).
20
+ The organization super admin creates the key in Settings → Organization settings → Organization API key. It is shown once.
186
21
 
187
22
  ```json
188
23
  {
189
24
  "mcpServers": {
190
25
  "archbee": {
191
- "command": "pnpm",
192
- "args": ["dlx", "@archbee/mcp"],
193
- "env": {
194
- "SPACE_ID": "PUBLISHED-<id-of-space>"
195
- }
26
+ "command": "npx",
27
+ "args": ["-y", "@archbee/mcp"],
28
+ "env": { "API_KEY": "abteam_<organization-key>" }
196
29
  }
197
30
  }
198
31
  }
199
32
  ```
200
33
 
201
- `API_BASE` (a link to the portal) still works instead of `SPACE_ID` when the link uses the hostname configured in Archbee. A domain that reverse-proxies to the portal cannot be resolved to its space, so use `SPACE_ID` there.
202
-
203
- ### Environment Variables - space id
204
-
205
- Required for the write tools, and also works for reading internal spaces.
206
-
207
- You can get an API token from Space Settings in Archbee app.
34
+ ### Space API key: read and write one space
208
35
 
209
- - `SPACE_ID`: Space id, taken from the space URL in the app
210
- - `API_KEY`: Your Archbee API token for that Space
211
-
212
- Use the live space id here. A `PUBLISHED-` or `PREVIEW-` snapshot id reads fine, but the API refuses every write through a snapshot credential.
213
-
214
- A space API key belongs to one space, so this configuration reads and writes that space only. For every space in the team, use a team key instead.
36
+ Create the key in the space settings. `SPACE_ID` is the live space id from the space URL in the app.
215
37
 
216
38
  ```json
217
39
  {
218
40
  "mcpServers": {
219
41
  "archbee": {
220
- "command": "pnpm",
221
- "args": ["dlx", "@archbee/mcp"],
222
- "env": {
223
- "SPACE_ID": "<id-of-space>",
224
- "API_KEY": "<api-key-of-space>"
225
- }
42
+ "command": "npx",
43
+ "args": ["-y", "@archbee/mcp"],
44
+ "env": { "API_KEY": "<space-key>", "SPACE_ID": "<space-id>" }
226
45
  }
227
46
  }
228
47
  }
229
48
  ```
230
49
 
231
- ### Environment Variables - team key
232
-
233
- Reads and writes every space in the team. The organization super-admin creates the key in Settings → Organization settings → Organization API key; it is shown once, on creation, and cannot be read back afterwards. Revoking it stops every assistant configured with it.
50
+ ### No key: read one public docs site
234
51
 
235
- - `API_KEY`: Team key, starting with `abteam_`
236
-
237
- No `SPACE_ID`: the key is not bound to a space, so the space travels per call. `get_doc`, `get_all_docs`, `search_query`, `search_title`, `create_doc`, `update_doc`, `delete_doc`, `apply_template`, `create_category`, `delete_category`, `update_doc_space` and `delete_doc_space` take a `docSpaceId` argument; `create_doc_space`, `create_space_group`, `delete_space_group`, `list_space_groups`, `whoami` and every reusable-resource tool act on the organization and take none.
52
+ `API_BASE` is the link to a published docs site with no access control (no password, login or JWT).
238
53
 
239
54
  ```json
240
55
  {
241
56
  "mcpServers": {
242
57
  "archbee": {
243
- "command": "pnpm",
244
- "args": ["dlx", "@archbee/mcp"],
245
- "env": {
246
- "API_KEY": "abteam_<team-key>"
247
- }
58
+ "command": "npx",
59
+ "args": ["-y", "@archbee/mcp"],
60
+ "env": { "API_BASE": "https://docs.example.com" }
248
61
  }
249
62
  }
250
63
  }
251
64
  ```
252
65
 
253
- ### Environment Variables - other Archbee installs
66
+ `docs.example.com` is an example: use your own site's address. A `SPACE_ID` starting with `PUBLISHED-`, set up from an older `/.well-known/mcp.json`, keeps working in place of `API_BASE`.
254
67
 
255
- Every configuration talks to `https://api.archbee.com` by default — the same host the Archbee CLI and the public API reference use. Point them elsewhere with:
68
+ ### Other Archbee installs
256
69
 
257
- - `ARCHBEE_API_URL`: Origin of your Archbee API, e.g. `https://qa.archbee.com` or `http://localhost:4000`
70
+ The key configurations and `SPACE_ID` talk to `https://api.archbee.com`. Set `ARCHBEE_API_URL` to the origin of another Archbee API, for example `https://eu.api.archbee.com`. It must be the API address: the app address (`https://app.archbee.com`) worked in 2.x and answers 404 in 3.0.0.
258
71
 
259
- Give the origin only — the server appends the `/api/...` route itself. A value without a scheme is rejected rather than silently falling back to the cloud.
72
+ ## Tools
260
73
 
261
- ```json
262
- {
263
- "mcpServers": {
264
- "archbee": {
265
- "command": "pnpm",
266
- "args": ["dlx", "@archbee/mcp"],
267
- "env": {
268
- "ARCHBEE_API_URL": "https://qa.archbee.com",
269
- "API_KEY": "abteam_<team-key>"
270
- }
271
- }
272
- }
273
- }
274
- ```
74
+ The hosted server lists them, with their descriptions, to your client. With a key you get documents (`search`, `search_title`, `fetch`, `get_all_docs`, `create_doc`, `create_docs`, `update_doc`, `delete_doc`), a file-system view of the docs (`ls`, `cd`, `cat`, `grep`, `find`), spaces and space groups, categories, templates, content snippets, variables and `whoami`. A public docs site offers `search`, `fetch` and `get_all_docs`, which returns the table of contents.
75
+
76
+ ## Upgrading from 2.x
77
+
78
+ 3.0.0 forwards to the hosted server instead of shipping its own copy of the tools. Your configuration keeps working unchanged, but two tools were renamed. `npx -y @archbee/mcp` without a version picks up 3.0.0 on its own, so update anything that lists tools by name: permission allowlists, `allowedTools`, CLAUDE.md or Cursor rules. To stay on 2.x for now, run `@archbee/mcp@2`.
79
+
80
+ | 2.x | 3.0.0 | Also changed |
81
+ | --- | ----- | ------------ |
82
+ | `get_doc` | `fetch` | The argument is `id`, was `docId` |
83
+ | `search_query` | `search` | With an organization key, no `docSpaceId` searches every space |
84
+
85
+ Without a key, `get_all_docs` returns the table of contents (title, path and id, paged) instead of every document's content, and `search_title` is gone: use `search`, then `fetch` each page you need. The `create_docs` warning about calls that time out while the server is still creating is now in the tool's description.
86
+
87
+ Requires Node.js 18 or newer.