Cover image
Try Now
2025-04-10

🤖📎用于快速客户端/服务器构建的超级小型MCP SDK。

3 years

Works with Finder

1

Github Watches

1

Github Forks

8

Github Stars

xsMCP

extra-small MCP SDK for quick client/server builds.

About

🚧 This project is under active development, stay tuned!

Why is there this project?

@modelcontextprotocol/sdk is large and has dependencies on libraries like zod, express, etc. that you probably don't even want to use.

Like xsAI, xsMCP does not force you to use a particular server or schema library and is very small.

Roadmap

Our current target is Streamable HTTP Client / Server, Stdio have lower priority.

Compatibility

xsMCP v0.1 is targeted to be compatible with the 2025-03-26 revision and is not backward compatible.

HTTP Server Structure

@xsmcp/server-http is based on Web Standards, not Express.

import { createServerAdapter } from '@whatwg-node/server'
import { createHttpServer } from '@xsmcp/server-http'
import { createServer } from 'node:http'

const server = createHttpServer({ ...options })

// (req: Request) => Promise<Response>
type ServerFetch = typeof server.fetch

// node.js
const httpServer = createServer(createServerAdapter(server.fetch))
httpServer.listen(3000)

// next.js
export const POST = router.fetch

// cloudflare workers, bun
export default server

It can be used as a server on its own or with hono, elysia and itty-router for more features:

import { createHttpServer } from '@xsmcp/server-http'
import { Elysia } from 'elysia'
import { Hono } from 'hono'
import { AutoRouter } from 'itty-router'

const server = createHttpServer({ ...options })

// hono
new Hono()
  .post('/mcp', ({ req }) => server.fetch(req.raw))

// elysia
new Elysia()
  .post('/mcp', ({ request }) => server.fetch(request))

// itty-router
AutoRouter()
  .post('/mcp', req => server.fetch(req))

At the same time, it does not depends on any server framework thus minimizing the size.

For simplicity reasons, this server only returns JSON Response, not SSE.

License

MIT

Third Party Licenses

This project partially copies code from the following projects:

Project License
modelcontextprotocol/specification MIT
modelcontextprotocol/servers MIT
modelcontextprotocol/typescript-sdk MIT
crouchcd/pkce-challenge MIT
denoland/std MIT

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

    Reviews

    4 (1)
    Avatar
    user_feZpSVlS
    2025-04-16

    As a dedicated user of MCP applications, I must say that the xsmcp by moeru-ai is an outstanding addition. The smooth integration and user-friendly interface make it a joy to use. If you are seeking reliability and efficiency, I highly recommend xsmcp. Exceptional work by moeru-ai! Check it out here: https://github.com/moeru-ai/xsmcp.