Back to MCP directory
publicPublicdnsLocal runtime

Hyper

hyper-mcp是一个基于WebAssembly插件的高性能MCP服务器,支持通过容器注册表分发插件,适用于多种AI应用场景。

article

README

🚀 hyper-mcp

hyper-mcp 是一个高效工具项目,支持通过不同插件实现多种功能,如网络请求、数据处理、文件操作等,能满足多样化的任务需求。

🚀 快速开始

要使用这个项目,请按照以下步骤进行:

  1. 克隆仓库:

    git clone https://github.com/tuananh/hyper-mcp.git
    cd hyper-mcp
    
  2. 构建项目(以 Rust 为例):

    cargo build --release
    
  3. 运行项目:

    ./target/release/hyper-mcp
    

✨ 主要特性

  • 插件支持:通过不同的插件实现多种功能。
  • 高效性能:优化了代码,使其运行效率高。
  • 易于扩展:方便添加新的功能模块。

📦 安装指南

克隆仓库

git clone https://github.com/tuananh/hyper-mcp.git
cd hyper-mcp

构建项目

cargo build --release

运行项目

./target/release/hyper-mcp

💻 使用示例

基础用法

以下是几个示例插件的介绍:

网络请求插件

  • 功能:发送 HTTP 请求,获取网页内容。
  • 使用场景:爬虫、数据抓取等。

文件操作插件

  • 功能:对本地文件进行读写、删除等操作。
  • 使用场景:文件管理、日志处理等。

高级用法

创建插件步骤

  1. 初始化新项目:

    mkdir my-plugin
    cd my-plugin
    cargo init --lib
    
  2. Cargo.toml 中添加依赖:

    [dependencies]
    hyper-mcp = "0.1"
    
  3. 编写插件代码(例如 src/lib.rs):

    use hyper_mcp::Plugin;
    
    pub struct MyPlugin;
    
    impl Plugin for MyPlugin {
        fn name(&self) -> &str {
            "my-plugin"
        }
    
        fn execute(&self, command: &str, args: Vec<String>) -> Result<String> {
            // 处理命令
            Ok(format!("执行了命令:{}", command))
        }
    }
    
  4. 构建插件:

    cargo build --release
    
  5. 发布插件到指定仓库(例如 Docker):

    FROM rust:1.86-slim AS builder
    
    RUN rustup target add wasm32-wasip1 && \
        rustup component add rust-std --target wasm32-wasip1 && \
        cargo install cargo-auditable
    
    WORKDIR /workspace
    COPY . .
    RUN cargo fetch
    RUN cargo auditable build --release --target wasm32-wasip1
    
    FROM scratch
    WORKDIR /
    COPY --from=builder /workspace/target/wasm32-wasip1/release/plugin.wasm /plugin.wasm
    

然后构建并推送镜像:

docker build -t your-registry/plugin-name .
docker push your-registry/plugin-name

📄 许可证

Apache 2.0

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client