@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/dist/index.js CHANGED
@@ -1,261 +1,224 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
3
  Object.defineProperty(exports, "__esModule", { value: true });
7
- const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
4
+ const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
8
5
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
9
- const axios_1 = __importDefault(require("axios"));
10
- const tool_schemas_1 = require("./tool-schemas");
11
- // A team key is not bound to a space, so the space travels per call instead of
12
- // being packed into the credential like a space key is.
6
+ const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
7
+ // A team key is not bound to a space, so the space travels per call instead of being packed into the credential.
13
8
  const TEAM_API_KEY_PREFIX = 'abteam_';
14
- const usesTeamApiKey = () => (process.env.API_KEY || '').startsWith(TEAM_API_KEY_PREFIX);
15
- // Create an MCP server
16
- const server = new mcp_js_1.McpServer({
17
- name: process.env.API_KEY ? 'Archbee CMS MCP' : 'Archbee Portal MCP',
18
- version: '2.7.0',
19
- });
20
- server.tool('get_all_docs', 'Read every document in the Archbee doc space, with its content, and each document carries the name of the space it belongs to (docSpaceName). Returns the whole space, so prefer search_query or search_title when looking for something specific.', tool_schemas_1.getAllDocsSchema, async (args) => callMcpApi({ tool: 'get-all-docs', ...args }));
21
- server.tool('get_doc', 'Read one Archbee document by id and return its content as markdown, alongside the id and name of the space it lives in. Each embedded content snippet appears as a :::ContentSnippet{docRefId="…"} block (list_content_snippets returns its text by that id); keep it when writing the content back, or the snippet is removed from the document.', tool_schemas_1.getDocSchema, async (args) => callMcpApi({ tool: 'get-doc', ...args }));
22
- server.tool('search_query', 'Search the Archbee doc space by document content and return the matching documents. This is the tool to use for answering a question from the documentation. An empty query returns every document.', tool_schemas_1.searchQuerySchema, async (args) => callMcpApi({ tool: 'search-query', ...args }));
23
- server.tool('search_title', 'Search the Archbee doc space by document title. Use this when looking for a page by name; use search_query to search inside document content.', tool_schemas_1.searchTitleSchema, async (args) => callMcpApi({ tool: 'search-title', ...args }));
24
- // Write tools. With a space key the target space comes from SPACE_ID; with a
25
- // team key it comes from the docSpaceId argument, which the team-level tools
26
- // below do not take because they act on the team, not on a space.
27
- server.tool('create_doc', "Create a new document in the Archbee doc space from Markdown or MDX content. Free Edits: the document is created with its content. Drafts & Reviews: it is created empty and the content is saved as its draft. Branches & Reviews: it is created and committed in a new branch. A draft or branch goes live only after someone reviews and merges it in Archbee, and the response's warning says so. The response's `id` is the new document's id.", tool_schemas_1.createDocSchema, async (args) => callWriteApi({ tool: 'create-doc', ...args }));
28
- server.tool('update_doc', "Update an existing Archbee document. Only the provided fields are changed. Free Edits: the change applies directly. Drafts & Reviews: saved as a draft. Branches & Reviews: saved and committed in a new branch. A draft or branch goes live only after someone reviews and merges it in Archbee, and the response's warning says so.", tool_schemas_1.updateDocSchema, async (args) => callWriteApi({ tool: 'update-doc', ...args }));
29
- server.tool('delete_doc', 'Permanently delete an Archbee document. This is destructive and cannot be undone: the document is removed together with every file and image uploaded to it, and any documents nested underneath it are deleted as well. Ask the user to confirm before calling this tool.', tool_schemas_1.deleteDocSchema, async (args) => callWriteApi({ tool: 'delete-doc', ...args }));
30
- server.tool('create_doc_space', "Create a new doc space (documentation space) in the current Archbee team. The response's `id` is the new space's id.", tool_schemas_1.createDocSpaceSchema, async (args) => callWriteApi({ tool: 'create-doc-space', ...args }));
31
- server.tool('update_doc_space', 'Update an Archbee doc space: rename it, or change its icon, hostname, space links, public access control or edit mode. Only the provided parts are changed, and at least one must be provided. The response echoes the space name and icon, and get_all_docs / get_doc report the name too, so a rename can be verified.', tool_schemas_1.updateDocSpaceSchema, async (args) => callWriteApi({ tool: 'update-doc-space', ...args }));
32
- server.tool('delete_doc_space', 'Permanently delete an Archbee doc space together with every document inside it. This is destructive and cannot be undone. With a space API key the space deleted is the one SPACE_ID points at, so that key dies with it and no further tool call will work; with a team key it is the space named by docSpaceId. Ask the user to confirm before calling this tool.', tool_schemas_1.deleteDocSpaceSchema, async (args) => callWriteApi({ tool: 'delete-doc-space', ...args }));
33
- server.tool('create_space_group', "Create a new space group (collection of doc spaces) in the current Archbee team. Requires a team admin. The response's `id` is the new group's id.", tool_schemas_1.createSpaceGroupSchema, async (args) => callWriteApi({ tool: 'create-space-group', ...args }));
34
- server.tool('delete_space_group', 'Delete a space group (collection of doc spaces) from the current Archbee team. Requires a team admin. The group must already be empty: move or delete every doc space it still contains first, otherwise the call is rejected.', tool_schemas_1.deleteSpaceGroupSchema, async (args) => callWriteApi({ tool: 'delete-space-group', ...args }));
35
- server.tool('list_space_groups', 'List every space group in the Archbee organization together with the doc spaces it contains, each with its id and name. Use it to discover a docSpaceId before calling a space-level tool. Requires a team API key (abteam_...); a space key is rejected.', tool_schemas_1.listSpaceGroupsSchema, async (args) => callMcpApi({ tool: 'list-space-groups', ...args }));
36
- server.tool('whoami', 'Show who the API key acts as: the user, the Archbee organization (id, name, plan), how many doc spaces it has and its space limit, and for a space key the space it is bound to. Call it to confirm which organization a key belongs to, or before create_doc_space to see whether the limit is reached.', tool_schemas_1.whoamiSchema, async () => callMcpApi({ tool: 'whoami' }));
37
- server.tool('create_category', 'Create a category (a folder in the space navigation) in an Archbee doc space. A category holds documents but has no content of its own. To put a document inside it, pass the returned `id` as `parentDocId` on create_doc or update_doc.', tool_schemas_1.createCategorySchema, async (args) => callWriteApi({ tool: 'create-category', ...args }));
38
- server.tool('delete_category', 'Delete a category from an Archbee doc space. The category must already be empty: move or delete the documents inside it first, otherwise the call is rejected. Deleting a category never deletes documents.', tool_schemas_1.deleteCategorySchema, async (args) => callWriteApi({ tool: 'delete-category', ...args }));
39
- server.tool('list_templates', 'List the document templates saved in the Archbee organization (Reusables → Templates), each with its id, name and content as markdown. Use apply_template to create a document from one.', tool_schemas_1.listTemplatesSchema, async () => callMcpApi({ tool: 'list-templates' }));
40
- server.tool('create_template', "Save a new document template in the Archbee organization, from Markdown or MDX content. A template is a starting point for new documents; it is not itself a published page. If a template with the same name already exists, the existing one is returned (alreadyExists: true) instead of a duplicate being created — its content is kept, so a different body needs a new name. The response's `id` is the template's id.", tool_schemas_1.createTemplateSchema, async (args) => callWriteApi({ tool: 'create-template', ...args }));
41
- server.tool('delete_template', "Delete a document template from the Archbee organization. The template is moved to the organization's Archives space (Archived Docs in the app), where a person can restore it. Ask the user to confirm before calling this tool.", tool_schemas_1.deleteTemplateSchema, async (args) => callWriteApi({ tool: 'delete-template', ...args }));
42
- server.tool('apply_template', "Create a new Archbee document from a saved template. The template content is copied verbatim, including blocks markdown cannot express (API endpoints, diagrams). The template itself is unchanged. The response's `id` is the new document's id.", tool_schemas_1.applyTemplateSchema, async (args) => callWriteApi({ tool: 'apply-template', ...args }));
43
- server.tool('list_content_snippets', 'List the reusable content snippets saved in the Archbee organization (Reusables → Content snippets), each with its id, name and content as markdown. A snippet is a block of content embedded into many documents and edited in one place.', tool_schemas_1.listContentSnippetsSchema, async () => callMcpApi({ tool: 'list-content-snippets' }));
44
- server.tool('create_content_snippet', "Create a reusable content snippet in the Archbee organization, from Markdown or MDX content. Requires a Scaling or Enterprise subscription. If a snippet with the same name already exists, the existing one is returned (alreadyExists: true) instead of a duplicate being created — its content is kept, use update_content_snippet to change it. The response's `id` is the snippet's id.", tool_schemas_1.createContentSnippetSchema, async (args) => callWriteApi({ tool: 'create-content-snippet', ...args }));
45
- server.tool('update_content_snippet', 'Update a reusable content snippet: rename it, replace its content, or both. The change reaches every document the snippet is embedded in. At least one of name or content must be provided.', tool_schemas_1.updateContentSnippetSchema, async (args) => callWriteApi({ tool: 'update-content-snippet', ...args }));
46
- server.tool('delete_content_snippet', 'Permanently delete a reusable content snippet from the Archbee organization. Documents that embed it lose that content. This cannot be undone — ask the user to confirm before calling this tool.', tool_schemas_1.deleteContentSnippetSchema, async (args) => callWriteApi({ tool: 'delete-content-snippet', ...args }));
47
- server.tool('list_variables', 'List the content variables and glossary terms saved in the Archbee organization (Reusables → Variables / Glossary), each with its id, name, value and per-space or per-language overrides.', tool_schemas_1.listVariablesSchema, async (args) => callMcpApi({ tool: 'list-variables', ...args }));
48
- server.tool('create_variable', "Create a content variable (or a glossary term) in the Archbee organization. A variable is referenced by name inside document content and resolved at render time. For a glossary term, readers see variableContent as the term and description as its definition (required) — the name is only the reference key. Requires a Scaling or Enterprise subscription. The response's `id` is the new variable's id.", tool_schemas_1.createVariableSchema, async (args) => callWriteApi({ tool: 'create-variable', ...args }));
49
- server.tool('update_variable', 'Update a content variable or glossary term. Only the provided fields change, and at least one must be provided. The new value reaches every document that references it.', tool_schemas_1.updateVariableSchema, async (args) => callWriteApi({ tool: 'update-variable', ...args }));
50
- server.tool('delete_variable', 'Permanently delete a content variable or glossary term from the Archbee organization. Documents that reference it by name stop resolving. Ask the user to confirm before calling this tool.', tool_schemas_1.deleteVariableSchema, async (args) => callWriteApi({ tool: 'delete-variable', ...args }));
51
- // Origin of the Archbee API the key belongs to, same variable the CLI takes.
52
- // app.archbee.com/api is being phased out, so the default is api.archbee.com.
53
- const apiUrl = (route) => {
54
- const apiUrlInput = (process.env.ARCHBEE_API_URL || '').trim() || 'https://api.archbee.com';
55
- try {
56
- return new URL(route, apiUrlInput).toString();
57
- }
58
- catch {
59
- return null;
60
- }
61
- };
62
- // The API finds a portal by its Archbee hostname only, so a custom proxy domain needs SPACE_ID.
63
- const resolvePortalSpaceId = async (portalUrl) => {
64
- var _a;
65
- const lookupUrl = apiUrl('/api/sites/get-docspace-by-hostname');
66
- if (lookupUrl === null) {
67
- throw new Error('Invalid ARCHBEE_API_URL format.');
68
- }
69
- let portal;
9
+ const DEFAULT_ARCHBEE_API_URL = 'https://api.archbee.com';
10
+ const API_ADDRESS_HINT = `ARCHBEE_API_URL must be the API address, such as ${DEFAULT_ARCHBEE_API_URL}, not the app address`;
11
+ class BridgeConfigError extends Error {
12
+ }
13
+ const environmentValue = (name) => (process.env[name] || '').trim();
14
+ const parseUrl = (value, errorMessage) => {
70
15
  try {
71
- portal = new URL(portalUrl);
16
+ return new URL(value);
72
17
  }
73
18
  catch {
74
- throw new Error('Invalid API_BASE format. Give the full https:// link to the portal.');
75
- }
76
- const docId = portal.pathname.replace(/\/+$/, '');
77
- const response = await axios_1.default.get(lookupUrl, {
78
- params: docId
79
- ? { hostname: portal.hostname, docId }
80
- : { hostname: portal.hostname },
81
- timeout: 30000,
82
- });
83
- const portalSpace = (_a = response.data) === null || _a === void 0 ? void 0 : _a.data;
84
- const spaceId = portalSpace === null || portalSpace === void 0 ? void 0 : portalSpace.id;
85
- // An unknown path answers 404 with the root space's id and a protected space 403: neither is readable keyless
86
- if ((portalSpace === null || portalSpace === void 0 ? void 0 : portalSpace.statusCode) ||
87
- typeof spaceId !== 'string' ||
88
- !spaceId.startsWith('PUBLISHED-')) {
89
- throw new Error("No public Archbee portal found at API_BASE. Set SPACE_ID to the id in the portal's /.well-known/mcp.json instead.");
19
+ throw new BridgeConfigError(errorMessage);
90
20
  }
91
- return spaceId;
92
21
  };
93
- let portalSpaceIdLookup = null;
94
- // One lookup per process; a failed one is dropped so the next call retries.
95
- const portalSpaceId = (portalUrl) => {
96
- portalSpaceIdLookup !== null && portalSpaceIdLookup !== void 0 ? portalSpaceIdLookup : (portalSpaceIdLookup = resolvePortalSpaceId(portalUrl).catch((error) => {
97
- portalSpaceIdLookup = null;
98
- throw error;
99
- }));
100
- return portalSpaceIdLookup;
22
+ const archbeeApiUrl = (route) => {
23
+ const apiOrigin = parseUrl(environmentValue('ARCHBEE_API_URL') || DEFAULT_ARCHBEE_API_URL, 'Invalid ARCHBEE_API_URL format.');
24
+ return new URL(route, apiOrigin);
101
25
  };
102
- // A team key authenticates on its own, so team-level tools need no space at all.
103
- // A space key carries no space id, so it travels packed with one.
104
- const authorizationHeader = (docSpaceId) => {
105
- const apiKey = process.env.API_KEY || '';
106
- if (!apiKey) {
107
- return '';
108
- }
109
- if (usesTeamApiKey()) {
110
- return `Bearer ${apiKey}`;
111
- }
112
- return docSpaceId
113
- ? `Bearer ${Buffer.from(`${docSpaceId}~${apiKey}`).toString('base64')}`
114
- : '';
115
- };
116
- const callMcpApi = async (params) => {
117
- const portalUrl = process.env.API_BASE || '';
118
- const teamMode = usesTeamApiKey();
119
- const docSpaceIdInput = teamMode
120
- ? params.docSpaceId || ''
121
- : process.env.SPACE_ID || '';
122
- if (!teamMode && !portalUrl && !docSpaceIdInput) {
123
- return {
124
- content: [{ type: 'text', text: 'API base URL or docSpaceId not set.' }],
125
- isError: true,
126
- };
127
- }
128
- // Without a usable key, reads go through the API's anonymous route for public published spaces.
129
- const authorization = authorizationHeader(docSpaceIdInput);
130
- const urlMcp = apiUrl(authorization ? '/api/public-mcp' : '/api/public-mcp-no-api-key');
131
- if (urlMcp === null) {
26
+ // API_KEY writes and reads as a member; without one, SPACE_ID or API_BASE reads one public docs site.
27
+ const resolveBridgeTarget = () => {
28
+ const apiKey = environmentValue('API_KEY');
29
+ const spaceId = environmentValue('SPACE_ID');
30
+ const portalUrl = environmentValue('API_BASE');
31
+ if (apiKey.startsWith(TEAM_API_KEY_PREFIX)) {
132
32
  return {
133
- content: [{ type: 'text', text: 'Invalid ARCHBEE_API_URL format.' }],
134
- isError: true,
33
+ url: archbeeApiUrl('/mcp'),
34
+ headers: { Authorization: `Bearer ${apiKey}` },
35
+ notFoundMessage: `No Archbee MCP server at this address: ${API_ADDRESS_HINT}.`,
135
36
  };
136
37
  }
137
- if (!authorization &&
138
- docSpaceIdInput &&
139
- !docSpaceIdInput.startsWith('PUBLISHED-')) {
38
+ if (apiKey) {
39
+ if (!spaceId) {
40
+ throw new BridgeConfigError('A space API_KEY needs SPACE_ID, the id of the space it belongs to.');
41
+ }
42
+ const credential = Buffer.from(`${spaceId}~${apiKey}`).toString('base64');
140
43
  return {
141
- content: [
142
- {
143
- type: 'text',
144
- text: "Reads without an API_KEY take the PUBLISHED- id from the portal's /.well-known/mcp.json. A live space id needs an API_KEY.",
145
- },
146
- ],
147
- isError: true,
44
+ url: archbeeApiUrl('/mcp'),
45
+ headers: { Authorization: `Bearer ${credential}` },
46
+ notFoundMessage: `No Archbee MCP server at this address: ${API_ADDRESS_HINT}.`,
148
47
  };
149
48
  }
150
- try {
151
- const docSpaceId = docSpaceIdInput || (authorization ? '' : await portalSpaceId(portalUrl));
152
- if (docSpaceId) {
153
- params.docSpaceId = docSpaceId;
49
+ if (spaceId) {
50
+ if (!spaceId.startsWith('PUBLISHED-')) {
51
+ throw new BridgeConfigError("Reads without an API_KEY take the PUBLISHED- id from the portal's /.well-known/mcp.json. A live space id needs an API_KEY.");
154
52
  }
155
- const response = await axios_1.default.post(urlMcp, params, {
156
- headers: authorization
157
- ? { Authorization: authorization, 'Content-Type': 'application/json' }
158
- : { 'Content-Type': 'application/json' },
159
- timeout: 30000,
160
- });
161
53
  return {
162
- content: [{ type: 'text', text: JSON.stringify(response.data) }],
54
+ url: archbeeApiUrl(`/mcp/space/${encodeURIComponent(spaceId)}`),
55
+ headers: {},
56
+ notFoundMessage: `No public documentation found for this SPACE_ID: check SPACE_ID. ${API_ADDRESS_HINT}.`,
163
57
  };
164
58
  }
165
- catch (error) {
166
- const errorMessage = formatError(error);
167
- console.error(`MCP API error: ${errorMessage}`);
59
+ if (portalUrl) {
60
+ const portal = parseUrl(portalUrl, 'Invalid API_BASE format. Give the full https:// link to the docs site.');
61
+ portal.pathname = `${portal.pathname.replace(/\/+$/, '')}/mcp`;
62
+ portal.search = '';
63
+ portal.hash = '';
168
64
  return {
169
- content: [{ type: 'text', text: errorMessage }],
170
- isError: true,
65
+ url: portal,
66
+ headers: {},
67
+ notFoundMessage: 'No public Archbee documentation found at this address: check API_BASE.',
171
68
  };
172
69
  }
70
+ throw new BridgeConfigError('Set API_KEY (plus SPACE_ID for a space key), or API_BASE with the link to a public docs site.');
173
71
  };
174
- // Writes need a live SPACE_ID + API_KEY: keyless mode is read-only and the API refuses writes made with a PUBLISHED-/PREVIEW- id.
175
- const callWriteApi = async (params) => {
176
- const teamMode = usesTeamApiKey();
177
- const docSpaceIdInput = teamMode
178
- ? params.docSpaceId || ''
179
- : process.env.SPACE_ID || '';
180
- if (!process.env.API_KEY || (!teamMode && !docSpaceIdInput)) {
181
- return {
182
- content: [
183
- {
184
- type: 'text',
185
- text: 'Write tools need an API_KEY, plus SPACE_ID when the key is a space key. The API_BASE configuration is read-only.',
186
- },
187
- ],
188
- isError: true,
189
- };
72
+ // The SDK appends the response body to its message; the server's own reason is its error_description.
73
+ const serverReason = (error) => {
74
+ try {
75
+ const body = JSON.parse(error.message.slice(error.message.indexOf('{')));
76
+ const reason = typeof body === 'object' && body !== null && 'error_description' in body
77
+ ? body.error_description
78
+ : undefined;
79
+ return typeof reason === 'string' ? reason : undefined;
190
80
  }
191
- if (docSpaceIdInput.startsWith('PUBLISHED-') ||
192
- docSpaceIdInput.startsWith('PREVIEW-')) {
193
- return {
194
- content: [
195
- {
196
- type: 'text',
197
- text: 'The target space is a published/preview snapshot, which cannot be written to. Use the live space id from the space URL in the Archbee app.',
198
- },
199
- ],
200
- isError: true,
201
- };
81
+ catch {
82
+ return undefined;
202
83
  }
203
- return callMcpApi(params);
204
84
  };
205
- const formatError = (error) => {
206
- if (axios_1.default.isAxiosError(error)) {
207
- if (error.code === 'ECONNABORTED') {
208
- return 'Request timeout - the server took too long to respond.';
85
+ const describeRemoteError = (error, target) => {
86
+ var _a;
87
+ if (error instanceof streamableHttp_js_1.StreamableHTTPError) {
88
+ if (error.code === 401) {
89
+ return 'Authentication failed: check API_KEY and SPACE_ID.';
209
90
  }
210
- if (error.code === 'ENOTFOUND' || error.code === 'ECONNREFUSED') {
211
- return 'Connection failed - unable to reach the API server.';
91
+ if (error.code === 403) {
92
+ return ((_a = serverReason(error)) !== null && _a !== void 0 ? _a : 'Access refused: check API_KEY and SPACE_ID.');
212
93
  }
213
- if (error.response) {
214
- const status = error.response.status;
215
- if (status === 401 || status === 403) {
216
- return 'Authentication failed - check your API key.';
217
- }
218
- if (status === 404) {
219
- return 'Resource not found - check the document ID.';
220
- }
221
- if (status >= 500) {
222
- return 'Server error - please try again later.';
223
- }
224
- return `API error (${status}): ${error.response.statusText}`;
94
+ if (error.code === 404) {
95
+ return target.notFoundMessage;
225
96
  }
226
- return `Network error: ${error.message}`;
227
97
  }
228
- if (error instanceof Error) {
229
- return error.message;
98
+ return error instanceof Error ? error.message : String(error);
99
+ };
100
+ const requestIdOf = (body) => {
101
+ if (typeof body !== 'string') {
102
+ return undefined;
103
+ }
104
+ try {
105
+ const message = JSON.parse(body);
106
+ return (0, types_js_1.isJSONRPCRequest)(message) ? message.id : undefined;
107
+ }
108
+ catch {
109
+ return undefined;
230
110
  }
231
- return 'An unexpected error occurred.';
232
111
  };
233
- const main = async () => {
234
- const transport = new stdio_js_1.StdioServerTransport();
235
- // Handle graceful shutdown
236
- const shutdown = async () => {
237
- console.error('Shutting down MCP server...');
238
- try {
239
- await server.close();
112
+ const runBridge = async (target) => {
113
+ const local = new stdio_js_1.StdioServerTransport();
114
+ let isClosing = false;
115
+ const pendingRequestIds = new Set();
116
+ // Without an answer the client waits on the request until its own timeout.
117
+ const answerWithError = (id, errorMessage) => {
118
+ if (isClosing || !pendingRequestIds.delete(id)) {
119
+ return;
240
120
  }
241
- catch {
242
- // Ignore close errors during shutdown
121
+ void local.send({
122
+ jsonrpc: '2.0',
123
+ id,
124
+ error: { code: types_js_1.ErrorCode.InternalError, message: errorMessage },
125
+ });
126
+ };
127
+ // A tool answer streams back; the SDK reports a dropped stream only to onerror, which names no request.
128
+ const fetchWatchingAnswers = async (url, init) => {
129
+ var _a;
130
+ const response = await fetch(url, init);
131
+ const requestId = requestIdOf(init === null || init === void 0 ? void 0 : init.body);
132
+ const isAnswerStream = (_a = response.headers
133
+ .get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('text/event-stream');
134
+ if (requestId === undefined || !response.body || !isAnswerStream) {
135
+ return response;
243
136
  }
244
- process.exit(0);
137
+ const reader = response.body.getReader();
138
+ const body = new ReadableStream({
139
+ pull: async (controller) => {
140
+ try {
141
+ const { done, value } = await reader.read();
142
+ if (done) {
143
+ controller.close();
144
+ }
145
+ else {
146
+ controller.enqueue(value);
147
+ }
148
+ }
149
+ catch (error) {
150
+ answerWithError(requestId, `The connection to Archbee dropped before the answer arrived. A write may or may not have been applied: check before retrying. (${error instanceof Error ? error.message : String(error)})`);
151
+ controller.error(error);
152
+ }
153
+ },
154
+ cancel: (reason) => reader.cancel(reason),
155
+ });
156
+ return new Response(body, {
157
+ status: response.status,
158
+ statusText: response.statusText,
159
+ headers: response.headers,
160
+ });
245
161
  };
246
- process.on('SIGINT', shutdown);
247
- process.on('SIGTERM', shutdown);
162
+ const remote = new streamableHttp_js_1.StreamableHTTPClientTransport(target.url, {
163
+ requestInit: { headers: target.headers },
164
+ fetch: fetchWatchingAnswers,
165
+ });
166
+ const shutdown = async (exitCode) => {
167
+ if (isClosing) {
168
+ return;
169
+ }
170
+ isClosing = true;
171
+ await Promise.allSettled([remote.close(), local.close()]);
172
+ process.exit(exitCode);
173
+ };
174
+ local.onmessage = (message) => {
175
+ if ((0, types_js_1.isJSONRPCRequest)(message)) {
176
+ pendingRequestIds.add(message.id);
177
+ }
178
+ // remote.onerror has already logged the failure.
179
+ remote.send(message).catch((error) => {
180
+ if ((0, types_js_1.isJSONRPCRequest)(message)) {
181
+ answerWithError(message.id, describeRemoteError(error, target));
182
+ }
183
+ });
184
+ };
185
+ remote.onmessage = (message) => {
186
+ if (((0, types_js_1.isJSONRPCResultResponse)(message) || (0, types_js_1.isJSONRPCErrorResponse)(message)) &&
187
+ message.id !== undefined) {
188
+ pendingRequestIds.delete(message.id);
189
+ }
190
+ // Later requests must carry the negotiated version in the mcp-protocol-version header.
191
+ if ((0, types_js_1.isJSONRPCResultResponse)(message) &&
192
+ typeof message.result.protocolVersion === 'string') {
193
+ remote.setProtocolVersion(message.result.protocolVersion);
194
+ }
195
+ void local.send(message);
196
+ };
197
+ remote.onerror = (error) => {
198
+ console.error(`Archbee MCP: ${describeRemoteError(error, target)}`);
199
+ };
200
+ local.onerror = (error) => {
201
+ console.error(`Archbee MCP: ${error.message}`);
202
+ };
203
+ local.onclose = () => {
204
+ void shutdown(0);
205
+ };
206
+ // The client quitting closes stdin, which the stdio transport does not report.
207
+ process.stdin.on('end', () => void shutdown(0));
208
+ process.on('SIGINT', () => void shutdown(0));
209
+ process.on('SIGTERM', () => void shutdown(0));
210
+ await remote.start();
211
+ await local.start();
212
+ console.error(`Archbee MCP bridge connected to ${target.url.origin}`);
213
+ };
214
+ const main = async () => {
248
215
  try {
249
- await server.connect(transport);
250
- console.error('Archbee MCP server started successfully');
216
+ await runBridge(resolveBridgeTarget());
251
217
  }
252
218
  catch (error) {
253
- console.error('Failed to start MCP server:', error instanceof Error ? error.message : error);
219
+ console.error(`Archbee MCP failed to start: ${error instanceof Error ? error.message : String(error)}`);
254
220
  process.exit(1);
255
221
  }
256
222
  };
257
- main().catch((error) => {
258
- console.error('Fatal error:', error instanceof Error ? error.message : error);
259
- process.exit(1);
260
- });
223
+ void main();
261
224
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAEA,oEAAmE;AACnE,wEAAgF;AAEhF,kDAAyB;AACzB,iDA6BuB;AAqCvB,+EAA+E;AAC/E,wDAAwD;AACxD,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAErC,MAAM,cAAc,GAAG,GAAY,EAAE,CACnC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AAE7D,uBAAuB;AACvB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;IAC3B,IAAI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E;QACnB,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAA;IAClB,CAAC,CAAA;IACD,+EAA+E;IAC/E,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAE/C,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAE7C,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;IACpB,MAAM,KAAK,CAAC,KAAK,EAAE,CAAA;IACnB,OAAO,CAAC,KAAK,CAAC,mCAAmC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAA;AACvE,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IACrC,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAA;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,gCAAgC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACzF,CAAA;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC,CAAA;AAED,KAAK,IAAI,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@archbee/mcp",
3
- "version": "2.7.0",
4
- "description": "",
3
+ "version": "3.0.0",
4
+ "description": "Connects stdio MCP clients to the hosted Archbee MCP server.",
5
5
  "main": "./dist/index.js",
6
6
  "files": [
7
7
  "dist",
@@ -14,8 +14,8 @@
14
14
  "scripts": {
15
15
  "compile": "rm -rf ./dist && tsc",
16
16
  "ts-check": "tsc --noEmit",
17
- "serve": "PORT=5001 pnpm run compile && PORT=5001 node ./dist/index.js",
18
- "start": "PORT=5001 node ./dist/index.js",
17
+ "serve": "pnpm run compile && node ./dist/index.js",
18
+ "start": "node ./dist/index.js",
19
19
  "release:dry": "pnpm run compile && npm publish --access public --dry-run",
20
20
  "release": "pnpm run compile && npm publish --access public"
21
21
  },
@@ -31,7 +31,6 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@modelcontextprotocol/sdk": "^1.32.1",
34
- "axios": "^1.20.0",
35
34
  "zod": "^4.6.7"
36
35
  },
37
36
  "devDependencies": {