MCP over SSE
About
An elixir Model Context Protocal (MCP) server library which uses the Server-Sent Events (SSE) transport type
Details
- Author
- kEND
- GitHub stars
- 64
- Downloads
- 240
- Categories
- Other
Jump to
- Full MCP server implementation over SSE
- JSON-RPC message handling
- Tool registration and execution
- Automatic ping/keepalive
- Session management with auto-generated IDs
- Error handling and validation
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP over SSECommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Add the library as a dependency, configure MIME types and the MCP server module, implement the MCPServer behaviour, and set up routing for the /sse and /message endpoints. Run your application with mix phx.server or mix run --no-halt. Connect clients such as MCP Inspector or Cursor to the SSE endpoint.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp over sse": {
"mcp_sse": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector@latest"
],
"env": {
"MCP_SERVER_URL": "localhost:4000"
}
}
}
}
}
McpServers
{
"mcp_sse": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector@latest"
],
"env": {
"MCP_SERVER_URL": "localhost:4000"
}
}
}
MCP over SSE
This library provides a simple implementation of the Model Context Protocol (MCP) over Server-Sent Events (SSE).
For more information about the Model Context Protocol, visit:
Model Context Protocol Documentation.
Table of Contents
- Features
- Create your own MCP server
- Installation
- For Phoenix Applications
- For Plug Applications with Bandit
- Usage
- With MCP Inspector
- With Cursor
- Configuration
- Port and HTTPS
- Paths
- Keepalive
- Quick Demo
- Other Notes
- Example Client Usage
- Session Management
- MCP Response Formatting
- Contributing
Features
- Full MCP server implementation
- SSE connection management
- JSON-RPC message handling
- Tool registration and execution
- Session management
- Automatic ping/keepalive
- Error handling and validation
Create your own MCP server
You must implement the MCPServer behaviour.
You only need to implement the required callbacks (handle_ping/1 and handle_initialize/2) and any optional callbacks for features you want to support.
The use MCPServer macro provides:
- Built-in message routing
- Protocol version validation
- Default implementations for optional callbacks
- JSON-RPC error handling
- Logging
See DefaultServer for a default implementation of the MCPServer behaviour.
Installation
For Phoenix Applications:
1. Add the required configuration to config/config.exs:
```elixir
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



