MCP.so
登录

MCP over SSE

@kEND

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

kEND

关于 MCP over SSE

An elixir Model Context Protocal (MCP) server library which uses the Server-Sent Events (SSE) transport type

MCP over SSE 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp_sse": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/inspector@latest"
      ],
      "env": {
        "MCP_SERVER_URL": "localhost:4000"
      }
    }
  }
}

MCP over SSE 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is MCP over SSE?

MCP over SSE is an Elixir library that provides a simple implementation of the Model Context Protocol (MCP) using Server-Sent Events. It is intended for developers building MCP servers with Phoenix or Plug/Bandit applications.

How to use MCP over SSE?

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.

Key features of MCP over SSE

  • 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

Use cases of MCP over SSE

  • Build custom MCP servers in Elixir for AI tool integration
  • Connect AI assistants like Cursor using SSE
  • Test MCP tools interactively with MCP Inspector
  • Handle multiple client sessions with automatic session ID generation

常见问题

1

What are the dependencies and runtime requirements?

Requires Elixir and either a Phoenix application or a Plug application with Bandit. The library depends on `:mime`, `:mcp_sse`, and optionally `:plug` and `:bandit`.

2

How does session management work?

Each connection must have a session ID. If the client does not provide one, the server automatically generates a new session ID and attaches it to query parameters for both the SSE and message endpoints.

3

What transport does MCP over SSE use?

It uses Server-Sent Events (SSE) for server-to-client messages and HTTP POST for client-to-server JSON-RPC requests, both over configurable paths.

4

Can I customize the endpoints and keepalive interval?

Yes. You can configure `sse_path`, `message_path`, and `sse_keepalive_timeout` (in milliseconds) in your application config. Setting the timeout to `:infinity` disables keepalive pings.

5

How should MCP tool responses be formatted?

Responses must follow the MCP specification. Supported content types are `text`, `image`, and `resource`. For structured data, convert it to a formatted JSON string using a JSON encoder.

评论

其他 分类下的更多 MCP 服务器