@tacitai/mcp-server 0.3.0 → 0.3.1

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/client.d.ts CHANGED
@@ -72,7 +72,7 @@ export declare class TacitClient {
72
72
  /** GET request returning parsed JSON. */
73
73
  get<T = unknown>(endpoint: string, params?: Record<string, string | number | boolean | undefined>): Promise<T>;
74
74
  /** POST request returning parsed JSON. `extraHeaders` merges on top of auth headers (e.g. If-Match). */
75
- post<T = unknown>(endpoint: string, body: unknown, extraHeaders?: Record<string, string>): Promise<T>;
75
+ post<T = unknown>(endpoint: string, body: unknown, extraHeaders?: Record<string, string>, timeoutMs?: number): Promise<T>;
76
76
  /** PUT request returning parsed JSON. */
77
77
  put<T = unknown>(endpoint: string, body: unknown): Promise<T>;
78
78
  /** DELETE request returning parsed JSON (or empty on 204). */
package/dist/client.js CHANGED
@@ -232,12 +232,15 @@ export class TacitClient {
232
232
  return res.json();
233
233
  }
234
234
  /** POST request returning parsed JSON. `extraHeaders` merges on top of auth headers (e.g. If-Match). */
235
- async post(endpoint, body, extraHeaders) {
236
- const res = await this._fetch(`${this.apiUrl}${endpoint}`, {
235
+ async post(endpoint, body, extraHeaders, timeoutMs) {
236
+ const opts = {
237
237
  method: 'POST',
238
238
  headers: this.authHeaders(extraHeaders),
239
239
  body: JSON.stringify(body),
240
- });
240
+ };
241
+ if (timeoutMs)
242
+ opts.signal = AbortSignal.timeout(timeoutMs);
243
+ const res = await this._fetch(`${this.apiUrl}${endpoint}`, opts);
241
244
  if (!res.ok) {
242
245
  const text = await res.text().catch(() => '');
243
246
  if (res.status === 401) {
@@ -96,7 +96,7 @@ export function buildSynthesizeRequest(client, input) {
96
96
  }
97
97
  else {
98
98
  // JSON path: POST /api/v1/mind/synthesize
99
- const result = await client.post('/api/v1/mind/synthesize', body);
99
+ const result = await client.post('/api/v1/mind/synthesize', body, undefined, 120_000);
100
100
  return {
101
101
  content: [{ type: 'text', text: JSON.stringify(result) }],
102
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacitai/mcp-server",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "stdio MCP server wrapping Tacit /api/v1 REST/SSE API",
5
5
  "license": "MIT",
6
6
  "repository": {