mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Update files
This commit is contained in:
16
packages/server/scripts/mcp-echo-test-server.mjs
Normal file
16
packages/server/scripts/mcp-echo-test-server.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||||
import { z } from "zod";
|
||||
|
||||
const server = new McpServer({ name: "paseo-test-mcp", version: "1.0.0" });
|
||||
|
||||
server.tool(
|
||||
"echo",
|
||||
{ text: z.string() },
|
||||
async ({ text }) => ({
|
||||
content: [{ type: "text", text: `ECHO:${text}` }],
|
||||
})
|
||||
);
|
||||
|
||||
const transport = new StdioServerTransport();
|
||||
await server.connect(transport);
|
||||
Reference in New Issue
Block a user