profound-mcp 0.26.0 → 0.26.2

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.
Files changed (76) hide show
  1. package/auth.d.mts +3 -1
  2. package/auth.d.mts.map +1 -1
  3. package/auth.d.ts +3 -1
  4. package/auth.d.ts.map +1 -1
  5. package/auth.js +15 -3
  6. package/auth.js.map +1 -1
  7. package/auth.mjs +12 -1
  8. package/auth.mjs.map +1 -1
  9. package/code-tool.d.mts +1 -1
  10. package/code-tool.d.mts.map +1 -1
  11. package/code-tool.d.ts +1 -1
  12. package/code-tool.d.ts.map +1 -1
  13. package/code-tool.js +7 -8
  14. package/code-tool.js.map +1 -1
  15. package/code-tool.mjs +8 -9
  16. package/code-tool.mjs.map +1 -1
  17. package/docs-search-tool.d.mts +9 -3
  18. package/docs-search-tool.d.mts.map +1 -1
  19. package/docs-search-tool.d.ts +9 -3
  20. package/docs-search-tool.d.ts.map +1 -1
  21. package/docs-search-tool.js +2 -4
  22. package/docs-search-tool.js.map +1 -1
  23. package/docs-search-tool.mjs +2 -4
  24. package/docs-search-tool.mjs.map +1 -1
  25. package/http.d.mts +1 -1
  26. package/http.d.mts.map +1 -1
  27. package/http.d.ts +1 -1
  28. package/http.d.ts.map +1 -1
  29. package/http.js +8 -6
  30. package/http.js.map +1 -1
  31. package/http.mjs +9 -7
  32. package/http.mjs.map +1 -1
  33. package/instructions.d.mts +2 -0
  34. package/instructions.d.mts.map +1 -0
  35. package/instructions.d.ts +2 -0
  36. package/instructions.d.ts.map +1 -0
  37. package/instructions.js +55 -0
  38. package/instructions.js.map +1 -0
  39. package/instructions.mjs +52 -0
  40. package/instructions.mjs.map +1 -0
  41. package/options.d.mts +1 -0
  42. package/options.d.mts.map +1 -1
  43. package/options.d.ts +1 -0
  44. package/options.d.ts.map +1 -1
  45. package/options.js +7 -0
  46. package/options.js.map +1 -1
  47. package/options.mjs +7 -0
  48. package/options.mjs.map +1 -1
  49. package/package.json +12 -2
  50. package/server.d.mts +8 -4
  51. package/server.d.mts.map +1 -1
  52. package/server.d.ts +8 -4
  53. package/server.d.ts.map +1 -1
  54. package/server.js +14 -33
  55. package/server.js.map +1 -1
  56. package/server.mjs +14 -33
  57. package/server.mjs.map +1 -1
  58. package/src/auth.ts +16 -1
  59. package/src/code-tool.ts +21 -12
  60. package/src/docs-search-tool.ts +9 -6
  61. package/src/http.ts +14 -7
  62. package/src/instructions.ts +74 -0
  63. package/src/options.ts +9 -0
  64. package/src/server.ts +24 -48
  65. package/src/stdio.ts +2 -2
  66. package/src/types.ts +12 -4
  67. package/stdio.js +2 -2
  68. package/stdio.js.map +1 -1
  69. package/stdio.mjs +2 -2
  70. package/stdio.mjs.map +1 -1
  71. package/types.d.mts +8 -1
  72. package/types.d.mts.map +1 -1
  73. package/types.d.ts +8 -1
  74. package/types.d.ts.map +1 -1
  75. package/types.js.map +1 -1
  76. package/types.mjs.map +1 -1
package/src/code-tool.ts CHANGED
@@ -1,11 +1,17 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { McpTool, Metadata, ToolCallResult, asErrorResult, asTextContentResult } from './types';
3
+ import {
4
+ McpRequestContext,
5
+ McpTool,
6
+ Metadata,
7
+ ToolCallResult,
8
+ asErrorResult,
9
+ asTextContentResult,
10
+ } from './types';
4
11
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
5
12
  import { readEnv, requireValue } from './util';
6
13
  import { WorkerInput, WorkerOutput } from './code-tool-types';
7
14
  import { SdkMethod } from './methods';
8
- import { Profound } from 'profoundai';
9
15
 
10
16
  const prompt = `Runs JavaScript code to interact with the Profound API.
11
17
 
@@ -34,7 +40,7 @@ Variables will not persist between calls, so make sure to return or log any data
34
40
  *
35
41
  * @param endpoints - The endpoints to include in the list.
36
42
  */
37
- export function codeTool(params: { blockedMethods: SdkMethod[] | undefined }): McpTool {
43
+ export function codeTool({ blockedMethods }: { blockedMethods: SdkMethod[] | undefined }): McpTool {
38
44
  const metadata: Metadata = { resource: 'all', operation: 'write', tags: [] };
39
45
  const tool: Tool = {
40
46
  name: 'execute',
@@ -54,19 +60,24 @@ export function codeTool(params: { blockedMethods: SdkMethod[] | undefined }): M
54
60
  required: ['code'],
55
61
  },
56
62
  };
57
- const handler = async (client: Profound, args: any): Promise<ToolCallResult> => {
63
+ const handler = async ({
64
+ reqContext,
65
+ args,
66
+ }: {
67
+ reqContext: McpRequestContext;
68
+ args: any;
69
+ }): Promise<ToolCallResult> => {
58
70
  const code = args.code as string;
59
71
  const intent = args.intent as string | undefined;
72
+ const client = reqContext.client;
60
73
 
61
74
  // Do very basic blocking of code that includes forbidden method names.
62
75
  //
63
76
  // WARNING: This is not secure against obfuscation and other evasion methods. If
64
77
  // stronger security blocks are required, then these should be enforced in the downstream
65
78
  // API (e.g., by having users call the MCP server with API keys with limited permissions).
66
- if (params.blockedMethods) {
67
- const blockedMatches = params.blockedMethods.filter((method) =>
68
- code.includes(method.fullyQualifiedName),
69
- );
79
+ if (blockedMethods) {
80
+ const blockedMatches = blockedMethods.filter((method) => code.includes(method.fullyQualifiedName));
70
81
  if (blockedMatches.length > 0) {
71
82
  return asErrorResult(
72
83
  `The following methods have been blocked by the MCP server and cannot be used in code execution: ${blockedMatches
@@ -76,16 +87,14 @@ export function codeTool(params: { blockedMethods: SdkMethod[] | undefined }): M
76
87
  }
77
88
  }
78
89
 
79
- // this is not required, but passing a Stainless API key for the matching project_name
80
- // will allow you to run code-mode queries against non-published versions of your SDK.
81
- const stainlessAPIKey = readEnv('STAINLESS_API_KEY');
82
90
  const codeModeEndpoint =
83
91
  readEnv('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool';
84
92
 
93
+ // Setting a Stainless API key authenticates requests to the code tool endpoint.
85
94
  const res = await fetch(codeModeEndpoint, {
86
95
  method: 'POST',
87
96
  headers: {
88
- ...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
97
+ ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
89
98
  'Content-Type': 'application/json',
90
99
  client_envs: JSON.stringify({
91
100
  PROFOUND_API_KEY: requireValue(
@@ -1,8 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { Metadata, asTextContentResult } from './types';
4
- import { readEnv } from './util';
5
-
3
+ import { Metadata, McpRequestContext, asTextContentResult } from './types';
6
4
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
5
 
8
6
  export const metadata: Metadata = {
@@ -43,13 +41,18 @@ export const tool: Tool = {
43
41
  const docsSearchURL =
44
42
  process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/profound/docs/search';
45
43
 
46
- export const handler = async (_: unknown, args: Record<string, unknown> | undefined) => {
44
+ export const handler = async ({
45
+ reqContext,
46
+ args,
47
+ }: {
48
+ reqContext: McpRequestContext;
49
+ args: Record<string, unknown> | undefined;
50
+ }) => {
47
51
  const body = args as any;
48
52
  const query = new URLSearchParams(body).toString();
49
- const stainlessAPIKey = readEnv('STAINLESS_API_KEY');
50
53
  const result = await fetch(`${docsSearchURL}?${query}`, {
51
54
  headers: {
52
- ...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
55
+ ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
53
56
  },
54
57
  });
55
58
 
package/src/http.ts CHANGED
@@ -6,7 +6,7 @@ import { ClientOptions } from 'profoundai';
6
6
  import express from 'express';
7
7
  import morgan from 'morgan';
8
8
  import morganBody from 'morgan-body';
9
- import { parseAuthHeaders } from './auth';
9
+ import { getStainlessApiKey, parseClientAuthHeaders } from './auth';
10
10
  import { McpOptions } from './options';
11
11
  import { initMcpServer, newMcpServer } from './server';
12
12
 
@@ -21,10 +21,12 @@ const newServer = async ({
21
21
  req: express.Request;
22
22
  res: express.Response;
23
23
  }): Promise<McpServer | null> => {
24
- const server = await newMcpServer();
24
+ const stainlessApiKey = getStainlessApiKey(req, mcpOptions);
25
+ const server = await newMcpServer(stainlessApiKey);
25
26
 
26
27
  try {
27
- const authOptions = parseAuthHeaders(req, false);
28
+ const authOptions = parseClientAuthHeaders(req, false);
29
+
28
30
  await initMcpServer({
29
31
  server: server,
30
32
  mcpOptions: mcpOptions,
@@ -32,6 +34,7 @@ const newServer = async ({
32
34
  ...clientOptions,
33
35
  ...authOptions,
34
36
  },
37
+ stainlessApiKey: stainlessApiKey,
35
38
  });
36
39
  } catch (error) {
37
40
  res.status(401).json({
@@ -112,13 +115,17 @@ export const streamableHTTPApp = ({
112
115
  return app;
113
116
  };
114
117
 
115
- export const launchStreamableHTTPServer = async (params: {
118
+ export const launchStreamableHTTPServer = async ({
119
+ mcpOptions,
120
+ debug,
121
+ port,
122
+ }: {
116
123
  mcpOptions: McpOptions;
117
124
  debug: boolean;
118
125
  port: number | string | undefined;
119
126
  }) => {
120
- const app = streamableHTTPApp({ mcpOptions: params.mcpOptions, debug: params.debug });
121
- const server = app.listen(params.port);
127
+ const app = streamableHTTPApp({ mcpOptions, debug });
128
+ const server = app.listen(port);
122
129
  const address = server.address();
123
130
 
124
131
  if (typeof address === 'string') {
@@ -126,6 +133,6 @@ export const launchStreamableHTTPServer = async (params: {
126
133
  } else if (address !== null) {
127
134
  console.error(`MCP Server running on streamable HTTP on port ${address.port}`);
128
135
  } else {
129
- console.error(`MCP Server running on streamable HTTP on port ${params.port}`);
136
+ console.error(`MCP Server running on streamable HTTP on port ${port}`);
130
137
  }
131
138
  };
@@ -0,0 +1,74 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { readEnv } from './util';
4
+
5
+ const INSTRUCTIONS_CACHE_TTL_MS = 15 * 60 * 1000; // 15 minutes
6
+
7
+ interface InstructionsCacheEntry {
8
+ fetchedInstructions: string;
9
+ fetchedAt: number;
10
+ }
11
+
12
+ const instructionsCache = new Map<string, InstructionsCacheEntry>();
13
+
14
+ // Periodically evict stale entries so the cache doesn't grow unboundedly.
15
+ const _cacheCleanupInterval = setInterval(() => {
16
+ const now = Date.now();
17
+ for (const [key, entry] of instructionsCache) {
18
+ if (now - entry.fetchedAt > INSTRUCTIONS_CACHE_TTL_MS) {
19
+ instructionsCache.delete(key);
20
+ }
21
+ }
22
+ }, INSTRUCTIONS_CACHE_TTL_MS);
23
+
24
+ // Don't keep the process alive just for cleanup.
25
+ _cacheCleanupInterval.unref();
26
+
27
+ export async function getInstructions(stainlessApiKey: string | undefined): Promise<string> {
28
+ const cacheKey = stainlessApiKey ?? '';
29
+ const cached = instructionsCache.get(cacheKey);
30
+
31
+ if (cached && Date.now() - cached.fetchedAt <= INSTRUCTIONS_CACHE_TTL_MS) {
32
+ return cached.fetchedInstructions;
33
+ }
34
+
35
+ const fetchedInstructions = await fetchLatestInstructions(stainlessApiKey);
36
+ instructionsCache.set(cacheKey, { fetchedInstructions, fetchedAt: Date.now() });
37
+ return fetchedInstructions;
38
+ }
39
+
40
+ async function fetchLatestInstructions(stainlessApiKey: string | undefined): Promise<string> {
41
+ // Setting the stainless API key is optional, but may be required
42
+ // to authenticate requests to the Stainless API.
43
+ const response = await fetch(
44
+ readEnv('CODE_MODE_INSTRUCTIONS_URL') ?? 'https://api.stainless.com/api/ai/instructions/profound',
45
+ {
46
+ method: 'GET',
47
+ headers: { ...(stainlessApiKey && { Authorization: stainlessApiKey }) },
48
+ },
49
+ );
50
+
51
+ let instructions: string | undefined;
52
+ if (!response.ok) {
53
+ console.warn(
54
+ 'Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...',
55
+ );
56
+
57
+ instructions = `
58
+ This is the profound MCP server. You will use Code Mode to help the user perform
59
+ actions. You can use search_docs tool to learn about how to take action with this server. Then,
60
+ you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
61
+ thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
62
+ block: it can be as long as you need to get the job done!
63
+ `;
64
+ }
65
+
66
+ instructions ??= ((await response.json()) as { instructions: string }).instructions;
67
+ instructions = `
68
+ If needed, you can get the current time by executing Date.now().
69
+
70
+ ${instructions}
71
+ `;
72
+
73
+ return instructions;
74
+ }
package/src/options.ts CHANGED
@@ -4,6 +4,7 @@ import qs from 'qs';
4
4
  import yargs from 'yargs';
5
5
  import { hideBin } from 'yargs/helpers';
6
6
  import z from 'zod';
7
+ import { readEnv } from './util';
7
8
 
8
9
  export type CLIOptions = McpOptions & {
9
10
  debug: boolean;
@@ -14,6 +15,7 @@ export type CLIOptions = McpOptions & {
14
15
 
15
16
  export type McpOptions = {
16
17
  includeDocsTools?: boolean | undefined;
18
+ stainlessApiKey?: string | undefined;
17
19
  codeAllowHttpGets?: boolean | undefined;
18
20
  codeAllowedMethods?: string[] | undefined;
19
21
  codeBlockedMethods?: string[] | undefined;
@@ -51,6 +53,12 @@ export function parseCLIOptions(): CLIOptions {
51
53
  description: 'Port to serve on if using http transport',
52
54
  })
53
55
  .option('socket', { type: 'string', description: 'Unix socket to serve on if using http transport' })
56
+ .option('stainless-api-key', {
57
+ type: 'string',
58
+ default: readEnv('STAINLESS_API_KEY'),
59
+ description:
60
+ 'API key for Stainless. Used to authenticate requests to Stainless-hosted tools endpoints.',
61
+ })
54
62
  .option('tools', {
55
63
  type: 'string',
56
64
  array: true,
@@ -81,6 +89,7 @@ export function parseCLIOptions(): CLIOptions {
81
89
  return {
82
90
  ...(includeDocsTools !== undefined && { includeDocsTools }),
83
91
  debug: !!argv.debug,
92
+ stainlessApiKey: argv.stainlessApiKey,
84
93
  codeAllowHttpGets: argv.codeAllowHttpGets,
85
94
  codeAllowedMethods: argv.codeAllowedMethods,
86
95
  codeBlockedMethods: argv.codeBlockedMethods,
package/src/server.ts CHANGED
@@ -11,55 +11,19 @@ import { ClientOptions } from 'profoundai';
11
11
  import Profound from 'profoundai';
12
12
  import { codeTool } from './code-tool';
13
13
  import docsSearchTool from './docs-search-tool';
14
+ import { getInstructions } from './instructions';
14
15
  import { McpOptions } from './options';
15
16
  import { blockedMethodsForCodeTool } from './methods';
16
- import { HandlerFunction, McpTool } from './types';
17
- import { readEnv } from './util';
17
+ import { HandlerFunction, McpRequestContext, ToolCallResult, McpTool } from './types';
18
18
 
19
- async function getInstructions() {
20
- // This API key is optional; providing it allows the server to fetch instructions for unreleased versions.
21
- const stainlessAPIKey = readEnv('STAINLESS_API_KEY');
22
- const response = await fetch(
23
- readEnv('CODE_MODE_INSTRUCTIONS_URL') ?? 'https://api.stainless.com/api/ai/instructions/profound',
24
- {
25
- method: 'GET',
26
- headers: { ...(stainlessAPIKey && { Authorization: stainlessAPIKey }) },
27
- },
28
- );
29
-
30
- let instructions: string | undefined;
31
- if (!response.ok) {
32
- console.warn(
33
- 'Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...',
34
- );
35
-
36
- instructions = `
37
- This is the profound MCP server. You will use Code Mode to help the user perform
38
- actions. You can use search_docs tool to learn about how to take action with this server. Then,
39
- you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
40
- thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
41
- block: it can be as long as you need to get the job done!
42
- `;
43
- }
44
-
45
- instructions ??= ((await response.json()) as { instructions: string }).instructions;
46
- instructions = `
47
- The current time in Unix timestamps is ${Date.now()}.
48
-
49
- ${instructions}
50
- `;
51
-
52
- return instructions;
53
- }
54
-
55
- export const newMcpServer = async () =>
19
+ export const newMcpServer = async (stainlessApiKey: string | undefined) =>
56
20
  new McpServer(
57
21
  {
58
22
  name: 'profoundai_api',
59
- version: '0.26.0',
23
+ version: '0.26.2',
60
24
  },
61
25
  {
62
- instructions: await getInstructions(),
26
+ instructions: await getInstructions(stainlessApiKey),
63
27
  capabilities: { tools: {}, logging: {} },
64
28
  },
65
29
  );
@@ -72,6 +36,7 @@ export async function initMcpServer(params: {
72
36
  server: Server | McpServer;
73
37
  clientOptions?: ClientOptions;
74
38
  mcpOptions?: McpOptions;
39
+ stainlessApiKey?: string | undefined;
75
40
  }) {
76
41
  const server = params.server instanceof McpServer ? params.server.server : params.server;
77
42
 
@@ -115,7 +80,14 @@ export async function initMcpServer(params: {
115
80
  throw new Error(`Unknown tool: ${name}`);
116
81
  }
117
82
 
118
- return executeHandler(mcpTool.handler, client, args);
83
+ return executeHandler({
84
+ handler: mcpTool.handler,
85
+ reqContext: {
86
+ client,
87
+ stainlessApiKey: params.stainlessApiKey ?? params.mcpOptions?.stainlessApiKey,
88
+ },
89
+ args,
90
+ });
119
91
  });
120
92
 
121
93
  server.setRequestHandler(SetLevelRequestSchema, async (request) => {
@@ -160,10 +132,14 @@ export function selectTools(options?: McpOptions): McpTool[] {
160
132
  /**
161
133
  * Runs the provided handler with the given client and arguments.
162
134
  */
163
- export async function executeHandler(
164
- handler: HandlerFunction,
165
- client: Profound,
166
- args: Record<string, unknown> | undefined,
167
- ) {
168
- return await handler(client, args || {});
135
+ export async function executeHandler({
136
+ handler,
137
+ reqContext,
138
+ args,
139
+ }: {
140
+ handler: HandlerFunction;
141
+ reqContext: McpRequestContext;
142
+ args: Record<string, unknown> | undefined;
143
+ }): Promise<ToolCallResult> {
144
+ return await handler({ reqContext, args: args || {} });
169
145
  }
package/src/stdio.ts CHANGED
@@ -3,9 +3,9 @@ import { McpOptions } from './options';
3
3
  import { initMcpServer, newMcpServer } from './server';
4
4
 
5
5
  export const launchStdioServer = async (mcpOptions: McpOptions) => {
6
- const server = await newMcpServer();
6
+ const server = await newMcpServer(mcpOptions.stainlessApiKey);
7
7
 
8
- await initMcpServer({ server, mcpOptions });
8
+ await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
9
9
 
10
10
  const transport = new StdioServerTransport();
11
11
  await server.connect(transport);
package/src/types.ts CHANGED
@@ -42,10 +42,18 @@ export type ToolCallResult = {
42
42
  isError?: boolean;
43
43
  };
44
44
 
45
- export type HandlerFunction = (
46
- client: Profound,
47
- args: Record<string, unknown> | undefined,
48
- ) => Promise<ToolCallResult>;
45
+ export type McpRequestContext = {
46
+ client: Profound;
47
+ stainlessApiKey?: string | undefined;
48
+ };
49
+
50
+ export type HandlerFunction = ({
51
+ reqContext,
52
+ args,
53
+ }: {
54
+ reqContext: McpRequestContext;
55
+ args: Record<string, unknown> | undefined;
56
+ }) => Promise<ToolCallResult>;
49
57
 
50
58
  export function asTextContentResult(result: unknown): ToolCallResult {
51
59
  return {
package/stdio.js CHANGED
@@ -4,8 +4,8 @@ exports.launchStdioServer = void 0;
4
4
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
5
5
  const server_1 = require("./server.js");
6
6
  const launchStdioServer = async (mcpOptions) => {
7
- const server = await (0, server_1.newMcpServer)();
8
- await (0, server_1.initMcpServer)({ server, mcpOptions });
7
+ const server = await (0, server_1.newMcpServer)(mcpOptions.stainlessApiKey);
8
+ await (0, server_1.initMcpServer)({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
9
9
  const transport = new stdio_js_1.StdioServerTransport();
10
10
  await server.connect(transport);
11
11
  console.error('MCP Server running on stdio');
package/stdio.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AAEjF,wCAAuD;AAEhD,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,GAAE,CAAC;IAEpC,MAAM,IAAA,sBAAa,EAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
1
+ {"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AAEjF,wCAAuD;AAEhD,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,EAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAE9D,MAAM,IAAA,sBAAa,EAAC,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAEzF,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
package/stdio.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
2
2
  import { initMcpServer, newMcpServer } from "./server.mjs";
3
3
  export const launchStdioServer = async (mcpOptions) => {
4
- const server = await newMcpServer();
5
- await initMcpServer({ server, mcpOptions });
4
+ const server = await newMcpServer(mcpOptions.stainlessApiKey);
5
+ await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
6
6
  const transport = new StdioServerTransport();
7
7
  await server.connect(transport);
8
8
  console.error('MCP Server running on stdio');
package/stdio.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C;OAEzE,EAAE,aAAa,EAAE,YAAY,EAAE;AAEtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;IAEpC,MAAM,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC"}
1
+ {"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C;OAEzE,EAAE,aAAa,EAAE,YAAY,EAAE;AAEtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAE9D,MAAM,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAEzF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC"}
package/types.d.mts CHANGED
@@ -31,7 +31,14 @@ export type ToolCallResult = {
31
31
  content: ContentBlock[];
32
32
  isError?: boolean;
33
33
  };
34
- export type HandlerFunction = (client: Profound, args: Record<string, unknown> | undefined) => Promise<ToolCallResult>;
34
+ export type McpRequestContext = {
35
+ client: Profound;
36
+ stainlessApiKey?: string | undefined;
37
+ };
38
+ export type HandlerFunction = ({ reqContext, args, }: {
39
+ reqContext: McpRequestContext;
40
+ args: Record<string, unknown> | undefined;
41
+ }) => Promise<ToolCallResult>;
35
42
  export declare function asTextContentResult(result: unknown): ToolCallResult;
36
43
  export declare function asBinaryContentResult(response: Response): Promise<ToolCallResult>;
37
44
  export declare function asErrorResult(message: string): ToolCallResult;
package/types.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"OAE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;
33
33
  };
34
- export type HandlerFunction = (client: Profound, args: Record<string, unknown> | undefined) => Promise<ToolCallResult>;
34
+ export type McpRequestContext = {
35
+ client: Profound;
36
+ stainlessApiKey?: string | undefined;
37
+ };
38
+ export type HandlerFunction = ({ reqContext, args, }: {
39
+ reqContext: McpRequestContext;
40
+ args: Record<string, unknown> | undefined;
41
+ }) => Promise<ToolCallResult>;
35
42
  export declare function asTextContentResult(result: unknown): ToolCallResult;
36
43
  export declare function asBinaryContentResult(response: Response): Promise<ToolCallResult>;
37
44
  export declare function asErrorResult(message: string): ToolCallResult;
package/types.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"OAEO,QAAQ,MAAM,YAAY;OAC1B,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EACJ;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,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