https://github.com/zuplo/mcp
A fetch API based TypeScript SDK for MCP
https://github.com/zuplo/mcp
ai mcp mcp-server modelcontextprotocol typescript
Last synced: 7 months ago
JSON representation
A fetch API based TypeScript SDK for MCP
- Host: GitHub
- URL: https://github.com/zuplo/mcp
- Owner: zuplo
- License: mit
- Created: 2025-05-06T16:02:35.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-06-10T20:00:48.000Z (8 months ago)
- Last Synced: 2025-06-13T10:54:49.510Z (7 months ago)
- Topics: ai, mcp, mcp-server, modelcontextprotocol, typescript
- Language: TypeScript
- Homepage:
- Size: 1.36 MB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

@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`](https://github.com/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](https://min-common-api.proposal.wintertc.org/).
It uses the [`fetch` APIs](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) and is intended to work out of the box on Zuplo, Node, Deno, Workerd, etc.
# ๐ Documentation
## Quickstart
1. Create an MCP server:
```ts
const server = new MCPServer({
name: "Example Server",
version: "1.0.0",
});
```
2. Add some tools:
```ts
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,
})
});
```
3. Wire up your MCP server with a transport:
```ts
const transport = new HTTPStreamableTransport()
await transport.connect();
server.withTransport(transport);
```
4. Handle a `Request`:
```ts
const response = await transport.handleRequest(httpRequest);
```
# ๐ค Contributing
See the [`CONTRIBUTING.md`](./CONTRIBUTING.md) for further details.