Skip to content

zuplo/mcp

Repository files navigation

zuplo mcp logo

@zuplo/mcp

A fetch API based, remote server first, TypeScript SDK for MCP.
About · Documentation · Contributing


🚧 Warning! In active development! 🚧

Attributions

Inspired by (with MIT Licensed attributions) - modelcontextprotocol/typescript-sdk

🚀 About

@zuplo/mcp is a remote server first MCP SDK that aims to be "minimum common API" compliant as defined by the WinterTC. It uses the fetch APIs and is intended to work out of the box on Zuplo, Node, Deno, Workerd, etc.

📝 Documentation

Quickstart

  1. Create an MCP server:
const server = new MCPServer({
  name: "Example Server",
  version: "1.0.0",
});
  1. Add some tools:
server.addTool({
  name: "add",
  description: "Adds two numbers together and returns the result.",
  validator: new ZodValidator(
    z.object({
      a: z.number().describe("First number"),
      b: z.number().describe("Second number")
    })
  ),
  handler: async ({ a, b }) => ({
    content: [{ type: "text", text: String(a + b) }],
    isError: false,
  })
});
  1. Wire up your MCP server with a transport:
const transport = new HTTPStreamableTransport()
await transport.connect();

server.withTransport(transport);
  1. Handle a Request:
const response = await transport.handleRequest(httpRequest);

🤝 Contributing

See the CONTRIBUTING.md for further details.

About

A fetch API based TypeScript SDK for MCP

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •