Erlmcp
БесплатноНе проверенStateless Model Context Protocol (MCP) client and server library for Erlang/OTP, targeting protocol version 2026-07-28.
Описание
Stateless Model Context Protocol (MCP) client and server library for Erlang/OTP, targeting protocol version 2026-07-28.
README
Stateless Model Context Protocol (MCP) client and server library for Erlang/OTP, targeting protocol version 2026-07-28.
Features (v0.1.0)
| Area | Status |
|---|---|
| JSON-RPC 2.0 | Complete validation, construction, errors, notifications |
| MCP protocol 2026-07-28 | Stateless _meta, server/discover, resultType, MRTR (input_required) |
| Tools | Registration, discovery, JSON Schema, concurrent execution with timeouts |
| MCP client | Discovery, tool listing, tool invocation, response validation |
| MCP server | Dispatch, tool execution, error mapping |
| STDIO transport | Newline-delimited JSON (client side) |
| Streamable HTTP | Client transport (POST + headers + JSON/SSE) + minimal server handler |
| Concurrency | Request correlation, pending-request limits, process isolation |
| Reliability | Timeouts, cancellation via process monitors, back-pressure |
Quick start
As a library (rebar3 / mix)
Add to your rebar.config (or equivalent) and start the application:
{ok, _} = erlmcp:start().
Register a tool (server side)
erlmcp:register_tool(#{
name => <<"echo">>,
description => <<"Echo the input text">>,
input_schema => #{
<<"type">> => <<"object">>,
<<"properties">> => #{
<<"text">> => #{<<"type">> => <<"string">>}
},
<<"required">> => [<<"text">>]
},
handler => fun(#{<<"text">> := Text}) ->
#{content => [#{<<"type">> => <<"text">>, <<"text">> => Text}]}
end
}).
Client over STDIO
{ok, #{connection := Conn}} = erlmcp:start_stdio_client(),
{ok, Discover} = erlmcp_client:discover(Conn),
{ok, Tools} = erlmcp_client:list_tools(Conn),
{ok, Result} = erlmcp_client:call_tool(Conn, <<"echo">>, #{<<"text">> => <<"hello">>}).
Client over Streamable HTTP
{ok, #{connection := Conn}} = erlmcp:start_http_client(<<"https://example.com/mcp">>),
{ok, Result} = erlmcp_client:call_tool(Conn, <<"echo">>, #{<<"text">> => <<"hello">>}).
HTTP server integration (Cowboy sketch)
%% In your Cowboy handler:
handle(Req, State) ->
{ok, Body, Req1} = cowboy_req:read_body(Req),
Headers = cowboy_req:headers(Req),
case erlmcp_http_handler:handle(Body, Headers) of
{ok, Status, RespHeaders, RespBody} ->
cowboy_req:reply(Status, maps:from_list(RespHeaders), RespBody, Req1);
{error, Status, ErrorBody} ->
cowboy_req:reply(Status, #{<<"content-type">> => <<"application/json">>},
ErrorBody, Req1)
end,
{ok, Req1, State}.
Architecture
erlmcp_client ──► erlmcp_client_connection ──► transport (stdio | http)
│
▼
erlmcp_server ◄── erlmcp_http_handler / stdio reader
│
├── erlmcp_tool_registry
└── erlmcp_tool_executor
- Client path is fully asynchronous and supports concurrent in-flight requests with correlation by JSON-RPC
id. - Server path is pure:
erlmcp_server:handle_message/1has no process state. Transports and the HTTP handler are thin adapters around it. - Tool handlers run in isolated monitored processes with per-call timeouts.
Protocol notes (2026-07-28)
- No
initializehandshake and no protocol-level sessions. - Every request carries
io.modelcontextprotocol/protocolVersion, client capabilities and (optionally) client info insideparams._meta. server/discoveris the recommended first call.- Multi-round-trip requests return
resultType: "input_required"; the client retries withinputResponses/requestState. - Streamable HTTP requires
MCP-Protocol-VersionandMcp-Methodheaders (plusMcp-Namefortools/call).
Building & testing
rebar3 compile
rebar3 eunit # once you add the test suite
License
Apache-2.0
Установка Erlmcp
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/pooriayousefi/erlmcpFAQ
Erlmcp MCP бесплатный?
Да, Erlmcp MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Erlmcp?
Нет, Erlmcp работает без API-ключей и переменных окружения.
Erlmcp — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Erlmcp в Claude Desktop, Claude Code или Cursor?
Открой Erlmcp на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Opencode Omniroute Plugin
OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @openc
автор: GitHub ActionsRoblox Studio
Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce
автор: paralovAntigravity Drawio
MCP server that enables AI assistants to create, parse, render, and validate Draw.io diagrams programmatically.
автор: S-SUJAN-SFetch
Web content fetching and conversion for efficient LLM usage.
Mcp
ModelContextProtocol server for enhancing JSON Resumes
автор: mcpflow.ioVault
Bitwarden/Vaultwarden MCP server — BYOK vault access with 6 tools, Send-based reveal, TOTP, and safe agent-write
автор: agbergsmannAWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
автор: lastmile-aiCompare Erlmcp with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
