refactor(client,server): move stdio transports to ./stdio subpath export (#1871)
Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
This commit is contained in:
parent
55b1f06cd4
commit
9fc9070b7b
5 changed files with 194 additions and 31 deletions
|
|
@ -4,7 +4,8 @@
|
|||
* ArkType implements the Standard Schema spec with built-in JSON Schema conversion.
|
||||
*/
|
||||
|
||||
import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
|
||||
import { McpServer } from '@modelcontextprotocol/server';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
||||
import { type } from 'arktype';
|
||||
|
||||
const server = new McpServer({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
* This demonstrates how to easily create tools with structured output
|
||||
*/
|
||||
|
||||
import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
|
||||
import { McpServer } from '@modelcontextprotocol/server';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
||||
import * as z from 'zod/v4';
|
||||
|
||||
const server = new McpServer({
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import { randomUUID } from 'node:crypto';
|
|||
import { createMcpExpressApp } from '@modelcontextprotocol/express';
|
||||
import { NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node';
|
||||
import type { CallToolResult, ResourceLink } from '@modelcontextprotocol/server';
|
||||
import { completable, McpServer, ResourceTemplate, StdioServerTransport } from '@modelcontextprotocol/server';
|
||||
import { completable, McpServer, ResourceTemplate } from '@modelcontextprotocol/server';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
||||
import * as z from 'zod/v4';
|
||||
//#endregion imports
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// Run with: pnpm tsx src/toolWithSampleServer.ts
|
||||
|
||||
import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
|
||||
import { McpServer } from '@modelcontextprotocol/server';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
||||
import * as z from 'zod/v4';
|
||||
|
||||
const mcpServer = new McpServer({
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
* StandardJSONSchemaV1-compliant schemas.
|
||||
*/
|
||||
|
||||
import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
|
||||
import { McpServer } from '@modelcontextprotocol/server';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
||||
import { toStandardJsonSchema } from '@valibot/to-json-schema';
|
||||
import * as v from 'valibot';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue