
mcp sse sample
展示基于 SSE 的 MCP 服务器与客户端的实现,附带工具使用示例。
Repository Info
About This Server
展示基于 SSE 的 MCP 服务器与客户端的实现,附带工具使用示例。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP-SSE sample
This demonstrates a working pattern for SSE-based MCP servers and standalone MCP clients that use tools from them.
Caution: MCP SSE is being deprecated, they are recommending to use Streamable-Http and this repo is just an exercise!
Node setup via nvm
nvm use 22
Project base setup
Install the required dependencies using npm:
npm install
cp .env.example .env
Build the Project
Compile the TypeScript code into JavaScript:
npm run build
This will generate the compiled files in the dist directory.
5. Run the Server
Start the server in production mode:
npm start
Alternatively, for development mode with live reloading, use:
npm run dev
Testing the Server
1. Using the MCP Inspector
The MCP Inspector is a tool to test and inspect your MCP server. You can use it to verify that your tools and prompts are registered correctly.
Run the following command to inspect your server:
npx @modelcontextprotocol/inspector ./dist/server.js
2. Using Postman MCP
Uou can try using postman MCP client connector: Postman Client Connector
This will open an interactive interface where you can test the tools and prompts registered in your server like below.
Quick Start
Clone the repository
git clone https://github.com/americoleonardo/mcp-sse-sampleInstall dependencies
cd mcp-sse-sample
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.