About Demo MCP Server
Demo MCP Server is a full-stack example of hosting an MCP server in a Blocklet, with both server and client code.
Key features
- 01Full-stack Blocklet example
- 02Authentication and authorization with @blocklet/mcp
- 03SSE transport setup
- 04Attach an MCP server to an app
Use cases
- 01参考 Blocklet 中 MCP 服务的配置
- 02查看 SSE 传输端点的设置
- 03了解应用如何挂载 MCP 服务
MCP support
项目示范在 Blocklet 中托管 MCP 服务,并使用 @blocklet/mcp 处理认证和授权。
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEDemo MCP Server
A demo blocklet that hosts a MCP server
This project was bootstrapped with Create Blocklet.
This blocklet is a dapp project, which means this is a full-stack application. It's contained both server and client code.
The MCP Server uses the @blocklet/mcp package to do authenticate and authorization.
Requirements
- Node.js version: >= 20.14.0
- Server version: >= 1.16.28
Blocklet as a MCP server
- Set
blocklet.yml#capabilities.mcptotrue - Setup your MCP server in
api/src/mcp/server.ts - Setup sse transport in
api/src/mcp/sse.ts, the endpoint must be/mcp/sse - Attach the MCP Server to your app in
api/src/index.ts - Use https://dev.store.blocklet.dev/blocklets/z2qZwzdTFvPFN275o7wm4WwXTAVBvdSfHSDqq to debug your MCP server
License
The code is licensed under the Apache 2.0 license found in the LICENSE file.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.