MCP Server Scaffold 974ade7b

MCPAI代理

提供方 OscarSaharoy

AI代理 未标注 会话登录 社区 / 第三方

一个基于Rust SDK的远程HTTP MCP服务器教程,适用于开发者快速搭建和测试MCP服务。

一句话选型结论

按资料字段整理

MCP Server Scaffold 974ade7b 属于AI代理类 MCP 服务器,传输方式未标注,会话登录,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

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

工具与能力

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

能力标签

适用场景

MCP协议Rust本地部署Rust开发服务器部署HTTP服务开发者工具

安装与配置

未标注 会话登录
上游未给出传输方式
  1. 1
    准备运行环境

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

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

    连接成功后客户端会列出约 1 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

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

值得选的地方

  • 资料标注 1 个工具,职责相对集中,接入后不容易误操作。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

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

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Server Scaffold 974ade7b当前 1 未标注 未标注 无 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

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

详细介绍

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

HTTP MCP Server Tutorial

For some reason its hard to find a good MCP server tutorial :( most are AI generated

This repo contains steps to create a remote HTTP MCP server.

Checking your MCP server works

It helps to check the MCP server is working as you develop it - this can be done with the MCP Inspector tool.

You can just run npx @modelcontextprotocol/inspector and then it gives you a UI to test your server as you go.

Which SDK to use

I think the rust SDK is best, just because there are API docs available (https://docs.rs/rmcp/0.4.1/rmcp/). To use it you will need to install rust.

How to deploy it

For a remote MCP server (using the HTTP transport rather than stdio) you will need to host it with a URL accessible to the web so that people can send it requests.

You can do it however like, on an EC2 instance or similar or even self hosted, but I think Vercel functions is optimal for easiest development, lowest cost, and most mature rust support. So for local development you will need to install the vercel CLI (npm i -g vercel).

> [!NOTE]
> I found that this stack can be hard to work with if you have a slow network connection as there is a lot to download and build - sorry if this doesn't work for that reason.

Getting started

This is how to create the minimal code to run an MCP server over HTTP with the rust SDK:

1. Create Cargo.toml

You can use these commands to create a minimal Cargo.toml and add dependencies:

The [[bin]] section is needed for the vercel function to work correctly.```bash
cargo init
cat << EOF >> Cargo.toml
tokio = { version = "1.47.1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
rmcp = { version = "0.2.0", features = ["server", "transport-streamable-http-server-session", "transport-sse-server", "transport-worker", "transport-streamable-http-server"] }
vercel_runtime = { version = "1" }
tower = "0.5.2"
http-body-util = "0.1.3"

[[bin]]
name = "mcp"
path = "api/mcp.rs"
EOF


You can test that your base rust project is working by running `cargo run` - after it compiles it should print &quot;Hello, World!&quot; :)

### 2. Create `vercel.json` and `.vercelignore`

`vercel.json` is the file that configures vercel to be able to serve your MCP tools :) this is specifying that the file at `api/mcp.rs` is a vercel function, and it will be available at the `/api/mcp` path when we deploy to the web (it will be available at `http://localhost:3000/api/mcp` during development when you run `vercel dev`).```bash
cat &lt;&lt; EOF &gt; vercel.json
{
  &quot;functions&quot;: {
    &quot;api/mcp.rs&quot;: {
      &quot;runtime&quot;: &quot;vercel-rust@4.0.9&quot;
    }
  }
}
EOF

.vercelignore just tells vercel not to upload the rust build artefacts as they can be very large.```bash
echo "target/" > .vercelignore


### 3. Add MCP server code to `api/mcp.rs`

Now create your main rust file with minimal code to run the server - the minimal code I landed on is about 100 lines, hopefully its clear enough :)

The code will just be in one file at `api/mcp.rs`, as I believe the code needs to be in the `api` directory rather than `src` for vercel to make a serverless function from it.```bash
mv src/ api/
mv api/main.rs api/mcp.rs

cat &lt;&lt; EOF &gt; api/mcp.rs
use rmcp::transport::streamable_http_server::{
    StreamableHttpService, session::local::LocalSessionManager, StreamableHttpServerConfig,
};
use vercel_runtime::{run, Body, Error, Request, Response};
use http_body_util::BodyExt;
use tower::util::ServiceExt;
use rmcp::{
    model::ErrorData as McpError,
    RoleServer,
    ServerHandler,
    handler::server::{router::tool::ToolRouter, tool::Parameters},
    model::*,
    schemars,
    service::RequestContext,
    tool, tool_handler, tool_router,
};

#[derive(Clone)]
pub struct MyMCPServerHandler {
    tool_router: ToolRouter&lt;MyMCPServerHandler&gt;,
    // counter: Arc&lt;Mutex&lt;i32&gt;&gt;,  // to persist data between tool calls you can add fields something like this
}

// This defines the input parameters for the `get_test_message` tool
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
pub struct TestMessageParams {
    pub test_param: String,
    // pub test_param_2: i32,  // you can add more params like this
}

#[tool_router]
impl MyMCPServerHandler {

    pub fn new() -&gt; Self {
        Self {
            tool_router: Self::tool_router(),
        }
    }

    #[tool(description = &quot;Return a test string&quot;)]
    async fn get_test_message(
        &amp;self,
        Parameters(TestMessageParams { test_param }): Parameters&lt;TestMessageParams&gt;
    ) -&gt; Result&lt;CallToolResult, McpError&gt; {

        Ok(CallToolResult::success(vec![Content::text(
            format!(&quot;Hello World! Value of test_param is: {}&quot;, test_param),
        )]))
    }
}

#[tool_handler]
impl ServerHandler for MyMCPServerHandler {
    fn get_info(&amp;self) -&gt; ServerInfo {
        ServerInfo {
            protocol_version: ProtocolVersion::V_2024_11_05,
            capabilities: ServerCapabilities::builder()
                .enable_tools()  // this enables MCP tools. You can also add eg. `.enable_prompts()` and `.enable_resources()`
                .build(),
            server_info: Implementation::from_build_env(),
            instructions: Some(
                &quot;This is a test MCP server. Use the `get_test_message` tool to return a test message.&quot;.to_string()
            ),
        }
    }

    async fn initialize(
        &amp;self,
        _request: InitializeRequestParam,  // the _request and _context parameters contain info about the request that can be parsed to get eg. the request URI and headers
        _context: RequestContext&lt;RoleServer&gt;,
    ) -&gt; Result&lt;InitializeResult, McpError&gt; {

        Ok(self.get_info())
    }
}

pub async fn handler(req: Request) -&gt; Result&lt;Response&lt;Body&gt;, Error&gt; {

    let service = StreamableHttpService::new(
        || Ok(MyMCPServerHandler::new()),
        LocalSessionManager::default().into(),
        StreamableHttpServerConfig {
            sse_keep_alive: None, // Not using SSE in serverless
            stateful_mode: false, // Stateless fits serverless best
        },
    );

    let response = service
        .oneshot(req)
        .await?;

    // Convert the body from BoxBody&lt;Bytes, Infallible&gt; to Vercel Body
    let (parts, body) = response.into_parts();
    let bytes = body.collect().await?.to_bytes();
    let vercel_body = Body::Binary(bytes.to_vec());

    Ok(Response::from_parts(parts, vercel_body))}

#[tokio::main]
async fn main() -&gt; Result&lt;(), Error&gt; {
    run(handler).await
}
EOF

4. Run locally with vercel dev

To test your MCP server locally, run vercel dev which should start a local development server. It might ask you some setup questions to help initialise your vercel project at this point; you should be able to accept all the defaults.

When the server has started and you request the url that corresponds to your serverless function (http://localhost:3000/api/mcp), the code will build which might take a moment.bash (venv) [oscarsaharoy@LCCC-MB-pTIY21 ~/projects/mcp-server-scaffold] $ vercel dev Vercel CLI 44.3.0 &gt; Ready! Available at http://localhost:3000

If you just visit the URL in your browser its not going to work as your browser doesn't use MCP. So you can use the MCP Inspector tool by running npx @modelcontextprotocol/inspector. Then, in the UI that it gives you, enter http://localhost:3000/api/mcp as the URL and "Streamable HTTP" as the transport. When you click Connect, if should work nicely, and let you list the tools available and run the test tool which should return a test message.

You can make any edits to the code that you would like to, and test them from the MCP inspector.

5. Deploy to vercel

Now to deploy your MCP server to production, run vercel. It will show you the build logs as it deploys, unfortunately it can take a few minutes. But once it completes your MCP server should be deployed and usable :) You can try to connect to it with the MCP inspector by entering the url (in my case it is https://mcp-server-scaffold.vercel.app/api/mcp as I called the vercel project "mcp-server-scaffold").

常见问题

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

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

MCP Server Scaffold 974ade7b 怎么在客户端里配置?

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

MCP Server Scaffold 974ade7b 收费吗?

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

MCP Server Scaffold 974ade7b 需要 API Key 吗?

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

MCP Server Scaffold 974ade7b 能提供哪些能力?

资料显示约 1 个工具;能力标签包括 服务器部署、开发工具、Rust、HTTP服务。具体工具清单以官方文档为准。

热门专题

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

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