Emcp D6caf7ae

MCP运维云端

提供方 serge2

运维云端 未标注 API Key 社区 / 第三方

emcp是一个轻量级的Erlang框架,用于构建基于HTTP/JSON-RPC的MCP(模型上下文协议)服务,提供会话生命周期管理、工具和资源处理以及输入模式验证。

一句话选型结论

按资料字段整理

Emcp D6caf7ae 属于运维云端类 MCP 服务器,传输方式未标注,API Key,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权API Key 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

Erlang本地部署Erlang框架JSON-RPCHTTP服务会话管理输入验证

安装与配置

未标注 API Key
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按官方文档接入试跑。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Emcp D6caf7ae当前 未标注 未标注 未标注 无 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方serge2上游标注的维护方 serge2
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

7.6 KB
来自项目仓库与上游目录的原文,未做删改

emcp — Erlang MCP server framework

Lightweight framework for building MCP (Model Context Protocol) services over HTTP(S).


Overview

emcp is a small Erlang framework for building MCP‑compatible services over HTTP(S). It provides session lifecycle management, support for tools, resources, prompts, client‑requested tool cancellation, and ping, as well as argument validation for tool calls based on incoming schemas.

Features

  • HTTP(S) transport for session initialization and MCP calls
  • Declarative tool/resource/prompt schemas and argument validation for tool invocations based on incoming schemas
  • Support for tools, resources, prompts, client‑requested tool cancellation, and ping
  • Maximum tool execution timeout of 5 minutes
  • Current limitations: resource lookup currently only matches names exactly; there is no validation for resource or prompt requests; dynamic capability changes are not supported; GET‑based subscription requests for messages are not supported
  • Easy extension: add new tools, resources, and prompts by declaring schemas and implementing handler functions
  • At the moment, the framework does not provide OAuth 2.1‑based user authorization; use API keys for access control instead

Quick start (integration example)

emcp is intended to be used as a library/framework inside your application. The steps below show a minimal integration example:

  1. Create a new Erlang application and add the dependency:```sh
    rebar3 new app my_app
    cd my_app

Add emcp to your `rebar.config` dependencies (use the appropriate git/hex reference for your setup):```erlang
{deps, [
  {emcp, "*", {git, "https://github.com/serge2/emcp.git", {branch, "master"}}}
]}.

Add emcp to the src file:```erlang
...
{applications, [
kernel,
stdlib,
emcp
]},
...


2. Implement an MCP module inside your application. Minimal example:```erlang
-module(my_app_mcp).
-export([schema/0]).

schema() ->
  #{
    name => <<"My App MCP">>,
    version => <<"0.1.0">>,
    title => <<"My app MCP implementation">>,
    tools => [
      #{
         definition => #{
            name => <<"echo">>,
            description => <<"Simple echo tool">>,
            inputSchema => #{ type => object, properties => #{ <<"message">> => #{ type => string } }, required => [<<"message">>] }
         },
         function => fun echo/3
       }
    ],
    resources => [
      #{
         definition => #{
            uri => <<"resource://sys/datetime">>,
            name => <<"System date and time">>,
            description => <<"Current local time, UTC time and time-zone">>,
            mimeType => <<"text/plain">>
         },
         function => fun resources_read/2
       }
    ],
    prompts => [
      #{
         definition => #{
            name => <<"code_review">>,
            title => <<"Request Code Review">>,
            description => <<"Asks the LLM to analyze code quality and suggest improvements">>,
            arguments => [
              #{
                name => <<"code">>,
                description => <<"The code to review">>,
                required => true
              }
            ]
         },
         function => fun prompts_code_review/3
       }
    ]
  }.

echo(_Name, #{<<"message">> := Msg}, _Extra) ->
  {ok, #{<<"text">> => Msg}}.

resources_read(URI, _Extra) ->
  Text = unicode:characters_to_binary(os:cmd("LC_ALL=C timedatectl | head -n4 | sed s/^[[:space:]]*//")),
  [#{<<"uri">> => URI, <<"mimeType">> => <<"text/plain">>, <<"text">> => Text}].

prompts_code_review(_Name, #{<<"code">> := Code}, _Extra) ->
  Prompt = unicode:characters_to_binary([<<"Please review this Python code:\n">>, Code]),
  {ok, #{<<"description">> => <<"Code review prompt">>,
         <<"messages">> => [
          #{
            <<"role">> => <<"user">>,
            <<"content">> => #{<<"type">> => <<"text">>, <<"text">> => Prompt}
          }
         ]
        }}.

  1. Add configuration values to your application's config (not the dependency). For example, in your sys.config / config provider:```erlang
    [
    {my_app, [{api_keys, ["secret-key-1"]}]},
    {emcp, [{tls, [{keyfile, "/etc/ssl/key.pem"}, {certfile, "/etc/ssl/cert.pem"}]}]}
    ].

4. There are two ways to start an MCP server: as a dedicated http-listener or as a part of a custom cowboy listener

Start the MCP as a dedicated listener:```erlang
-module(my_app_app).

-behaviour(application).

-export([start/2, stop/1]).

start(_StartType, _StartArgs) ->
    AllowedApiKeys = application:get_env(my_app, api_keys, []),
    emcp:start(my_app_mcp_listener, my_app_mcp, {0,0,0,0}, 8080, "/mcp", _UseTLS = false, AllowedApiKeys, _Extra = #{}),
    my_app_sup:start_link().

stop(_State) ->
    emcp:stop(my_app_mcp_listener),
    ok.

Start the MCP as a part of a custom listener:```erlang
-module(my_app_app).

-behaviour(application).

-export([start/2, stop/1]).

start(_StartType, _StartArgs) ->
AllowedApiKeys = application:get_env(my_app, api_keys, []),

Dispatch = cowboy_router:compile([
    {'_', [
      emcp:cowboy_route("/mcp", test_mcp, AllowedApiKeys, #{}), % The route for the MCP
      {<<"/[...]">>, main_handler, #{}}     % A route for another requests
    ]}
]),

{ok, _} = cowboy:start_clear(
    http_listener,
    [{port, 8080}, {ip, {0,0,0,0}}],
    #{env => #{dispatch => Dispatch}}
),
my_app_sup:start_link().

stop(_State) ->
cowboy:stop_listener(http_listener),
ok.


5. Build and run your application:```sh
rebar3 compile
rebar3 shell
# in the Erlang shell
application:ensure_all_started(my_app).

Usage example (HTTP / JSON‑RPC)

Initialize a session (include API key if the server is configured to require one — x-api-key or Authorization: Bearer):```sh
curl -i -X POST http://localhost:8080/mcp \
-H 'Content-Type: application/json' \
-H 'x-api-key: secret-key-1' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"capabilities":{}}}'


The response will include an `Mcp-Session-Id` header — include it in subsequent calls:

### Get a list of implemented tools:```sh
curl -i -X POST http://localhost:8080/mcp \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: secret-key-1' \
  -H 'Mcp-Session-Id: <session-id>' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

Call the echo tool:```sh

curl -i -X POST http://localhost:8080/mcp \
-H 'Content-Type: application/json' \
-H 'x-api-key: secret-key-1' \
-H 'Mcp-Session-Id: <session-id>' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"echo","arguments":{"message": "Hello, world!"}}}'


### Read resource example (system datetime):```sh
curl -i -X POST http://localhost:8080/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;x-api-key: secret-key-1&#x27; \
  -H &#x27;Mcp-Session-Id: &lt;session-id&gt;&#x27; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:4,&quot;method&quot;:&quot;resources/read&quot;,&quot;params&quot;:{&quot;uri&quot;:&quot;resource://sys/datetime&quot;}}&#x27;

Get a list of prompts:```sh

curl -i -X POST http://localhost:8080/mcp \
-H 'Content-Type: application/json' \
-H 'x-api-key: secret-key-1' \
-H 'Mcp-Session-Id: <session-id>' \
-d '{"jsonrpc":"2.0","id":5,"method":"prompts/list","params":{}}'

### Get a prompt:```sh
curl -i -X POST http://localhost:8080/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;x-api-key: secret-key-1&#x27; \
  -H &#x27;Mcp-Session-Id: &lt;session-id&gt;&#x27; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:6,&quot;method&quot;:&quot;prompts/get&quot;,&quot;params&quot;:{&quot;name&quot;: &quot;code_review&quot;, &quot;arguments&quot;: {&quot;code&quot;: &quot;def hello():\n    print(&#x27;world&#x27;)&quot;}}}&#x27;

Copyright and License

Copyright (c) 2025-2026 Sergii Polkovnikov

This project is licensed under the MIT License. See LICENSE for the full text.

常见问题

5 问
答案由本站依据条目字段整理,不引用上游原文
Emcp D6caf7ae 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Emcp D6caf7ae 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Emcp D6caf7ae 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Emcp D6caf7ae 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Emcp D6caf7ae 能提供哪些能力?

资料显示能力标签包括 会话管理、HTTP服务、云端部署。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。