@@ -3,6 +3,8 @@ title: Mcp
33description : Mcp protocol schemas
44---
55
6+ { /* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */ }
7+
68Model Context Protocol (MCP)
79
810Defines the protocol for connecting AI assistants to external tools, data sources,
@@ -38,8 +40,8 @@ Use Cases:
3840## TypeScript Usage
3941
4042``` typescript
41- import { MCPCapability , MCPClientConfig , MCPPrompt , MCPPromptArgument , MCPPromptMessage , MCPPromptRequest , MCPPromptResponse , MCPResource , MCPResourceRequest , MCPResourceResponse , MCPResourceTemplate , MCPResourceType , MCPServerConfig , MCPServerInfo , MCPTool , MCPToolCallRequest , MCPToolCallResponse , MCPToolParameter , MCPTransportConfig , MCPTransportType } from ' @objectstack/spec/ai' ;
42- import type { MCPCapability , MCPClientConfig , MCPPrompt , MCPPromptArgument , MCPPromptMessage , MCPPromptRequest , MCPPromptResponse , MCPResource , MCPResourceRequest , MCPResourceResponse , MCPResourceTemplate , MCPResourceType , MCPServerConfig , MCPServerInfo , MCPTool , MCPToolCallRequest , MCPToolCallResponse , MCPToolParameter , MCPTransportConfig , MCPTransportType } from ' @objectstack/spec/ai' ;
43+ import { MCPCapability , MCPClientConfig , MCPPrompt , MCPPromptArgument , MCPPromptMessage , MCPPromptRequest , MCPPromptResponse , MCPResource , MCPResourceRequest , MCPResourceResponse , MCPResourceTemplate , MCPResourceType , MCPRootEntry , MCPRootsConfig , MCPSamplingConfig , MCPServerConfig , MCPServerInfo , MCPStreamingConfig , MCPTool , MCPToolApproval , MCPToolCallRequest , MCPToolCallResponse , MCPToolParameter , MCPTransportConfig , MCPTransportType } from ' @objectstack/spec/ai' ;
44+ import type { MCPCapability , MCPClientConfig , MCPPrompt , MCPPromptArgument , MCPPromptMessage , MCPPromptRequest , MCPPromptResponse , MCPResource , MCPResourceRequest , MCPResourceResponse , MCPResourceTemplate , MCPResourceType , MCPRootEntry , MCPRootsConfig , MCPSamplingConfig , MCPServerConfig , MCPServerInfo , MCPStreamingConfig , MCPTool , MCPToolApproval , MCPToolCallRequest , MCPToolCallResponse , MCPToolParameter , MCPTransportConfig , MCPTransportType } from ' @objectstack/spec/ai' ;
4345
4446// Validate data
4547const result = MCPCapability .parse (data );
@@ -77,6 +79,7 @@ const result = MCPCapability.parse(data);
7779| ** retryDelay** | ` integer ` | ✅ | |
7880| ** enableLogging** | ` boolean ` | ✅ | |
7981| ** logLevel** | ` Enum<'debug' \| 'info' \| 'warn' \| 'error'> ` | ✅ | |
82+ | ** roots** | ` Object ` | optional | Root directories/resources configuration |
8083
8184
8285---
@@ -223,6 +226,54 @@ const result = MCPCapability.parse(data);
223226* ` stream `
224227
225228
229+ ---
230+
231+ ## MCPRootEntry
232+
233+ A single root directory or resource
234+
235+ ### Properties
236+
237+ | Property | Type | Required | Description |
238+ | :--- | :--- | :--- | :--- |
239+ | ** uri** | ` string ` | ✅ | Root URI (e.g., file:///path/to/project) |
240+ | ** name** | ` string ` | optional | Human-readable root name |
241+ | ** readOnly** | ` boolean ` | optional | Whether the root is read-only |
242+
243+
244+ ---
245+
246+ ## MCPRootsConfig
247+
248+ Roots configuration for MCP client
249+
250+ ### Properties
251+
252+ | Property | Type | Required | Description |
253+ | :--- | :--- | :--- | :--- |
254+ | ** roots** | ` Object[] ` | ✅ | Root directories or resources available to the client |
255+ | ** watchForChanges** | ` boolean ` | ✅ | Watch root directories for filesystem changes |
256+ | ** notifyOnChange** | ` boolean ` | ✅ | Notify server when root contents change |
257+
258+
259+ ---
260+
261+ ## MCPSamplingConfig
262+
263+ Sampling configuration for MCP
264+
265+ ### Properties
266+
267+ | Property | Type | Required | Description |
268+ | :--- | :--- | :--- | :--- |
269+ | ** enabled** | ` boolean ` | ✅ | Enable LLM sampling |
270+ | ** maxTokens** | ` integer ` | ✅ | Maximum tokens to generate |
271+ | ** temperature** | ` number ` | optional | Sampling temperature |
272+ | ** stopSequences** | ` string[] ` | optional | Stop sequences to end generation |
273+ | ** modelPreferences** | ` string[] ` | optional | Preferred model IDs in priority order |
274+ | ** systemPrompt** | ` string ` | optional | System prompt for sampling context |
275+
276+
226277---
227278
228279## MCPServerConfig
@@ -250,6 +301,9 @@ const result = MCPCapability.parse(data);
250301| ** version** | ` string ` | ✅ | |
251302| ** createdAt** | ` string ` | optional | |
252303| ** updatedAt** | ` string ` | optional | |
304+ | ** streaming** | ` Object ` | optional | Streaming configuration |
305+ | ** toolApproval** | ` Object ` | optional | Tool approval configuration |
306+ | ** sampling** | ` Object ` | optional | LLM sampling configuration |
253307
254308
255309---
@@ -270,6 +324,22 @@ const result = MCPCapability.parse(data);
270324| ** documentation** | ` string ` | optional | Documentation URL |
271325
272326
327+ ---
328+
329+ ## MCPStreamingConfig
330+
331+ Streaming configuration for MCP communication
332+
333+ ### Properties
334+
335+ | Property | Type | Required | Description |
336+ | :--- | :--- | :--- | :--- |
337+ | ** enabled** | ` boolean ` | ✅ | Enable streaming for MCP communication |
338+ | ** chunkSize** | ` integer ` | optional | Size of each streamed chunk in bytes |
339+ | ** heartbeatIntervalMs** | ` integer ` | ✅ | Heartbeat interval in milliseconds |
340+ | ** backpressure** | ` Enum<'drop' \| 'buffer' \| 'block'> ` | optional | Backpressure handling strategy |
341+
342+
273343---
274344
275345## MCPTool
@@ -295,6 +365,22 @@ const result = MCPCapability.parse(data);
295365| ** version** | ` string ` | ✅ | |
296366
297367
368+ ---
369+
370+ ## MCPToolApproval
371+
372+ Tool approval configuration for MCP
373+
374+ ### Properties
375+
376+ | Property | Type | Required | Description |
377+ | :--- | :--- | :--- | :--- |
378+ | ** requireApproval** | ` boolean ` | ✅ | Require approval before tool execution |
379+ | ** approvalStrategy** | ` Enum<'human_in_loop' \| 'auto_approve' \| 'policy_based'> ` | ✅ | Approval strategy for tool execution |
380+ | ** dangerousToolPatterns** | ` string[] ` | optional | Regex patterns for tools needing approval |
381+ | ** autoApproveTimeout** | ` integer ` | optional | Auto-approve timeout in seconds |
382+
383+
298384---
299385
300386## MCPToolCallRequest
0 commit comments