agentversity/MCP-server-demo
If you are the rightful owner of MCP-server-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The MCP Notes Server is a hosted SSE-based server designed for real-time note management and collaboration, suitable for deployment on cloud platforms and VS Code servers.
MCP Notes Server - Hosted SSE Version
A Model Context Protocol (MCP) server that runs over HTTP using Server-Sent Events (SSE), suitable for deployment on hosted VS Code servers or any cloud environment.
🎯 Purpose
This is a hosted version of the MCP Notes Server that:
- Runs as an HTTP server accessible over the network
- Uses SSE (Server-Sent Events) for MCP communication
- Can be deployed on VS Code servers, cloud platforms, or any server
- Allows multiple clients to connect simultaneously
🚀 Quick Start
1. Install Dependencies
pip install -r requirements.txt
2. Run the Server
python server.py
The server will start on http://0.0.0.0:8000/sse
3. Test with the Client
In another terminal:
python client_sse.py
📁 Files
server.py- SSE-based MCP serverclient_sse.py- Example client that connects via SSErequirements.txt- Python dependencies
🌐 Deployment
On Hosted VS Code Server
- Upload files to your VS Code server
- Install dependencies:
pip install -r requirements.txt - Run server:
python server.py - Access from anywhere:
http://your-server-ip:8000/sse
Port Forwarding (if needed)
If running on VS Code Server with port forwarding:
# The server will be accessible at the forwarded URL
# Example: https://your-vscode-server.com/proxy/8000/sse
Environment Variables
Create a .env file for configuration:
HOST=0.0.0.0
PORT=8000
🔧 Available MCP Features
Tools
add_note(title, content)- Add a new notelist_notes()- Get all notesdelete_note(title)- Delete a note by title
Resources
note://internal/all- Read all notes
Prompts
summarize_notes- Generate a summarization prompt
🔌 Connecting Clients
Python Client
from mcp.client.sse import sse_client
async with sse_client("http://your-server:8000/sse") as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# Use the session...
Claude Desktop (SSE)
Add to claude_desktop_config.json:
{
"mcpServers": {
"notes": {
"url": "http://your-server:8000/sse"
}
}
}
Web Browser
The SSE endpoint can be accessed from JavaScript:
const eventSource = new EventSource('http://your-server:8000/sse');
🏥 Health Check
Check if the server is running:
curl http://localhost:8000/health
🔒 Security Notes
For production deployment:
- Add authentication (API keys, OAuth)
- Use HTTPS (TLS/SSL)
- Configure CORS if needed
- Add rate limiting
- Use environment variables for sensitive config
📊 Architecture
[Client 1] ──┐
[Client 2] ──┼──> [SSE Server :8000] ──> [MCP Handler] ──> [Notes Storage]
[Client 3] ──┘
Multiple clients can connect simultaneously to the same server instance.
🐛 Troubleshooting
Server won't start
- Check if port 8000 is available:
lsof -i :8000 - Try a different port: Modify
server.pyline withuvicorn.run(..., port=8001)
Client can't connect
- Verify server is running:
curl http://localhost:8000/health - Check firewall settings
- Ensure correct URL in client
Notes not persisting
- This version uses in-memory storage
- Notes are lost when server restarts
- For persistence, add database integration
🎓 For Your Event
This setup is perfect for demonstrations where:
- Multiple attendees connect to one server
- Server runs on a central lab machine
- Attendees can access from their own devices
- You want to show real-time collaboration