Token导航 LogoToken导航TokenDH.com
Neva MCP logo
AI代理stdio官方级别未说明来源级核验

Neva MCP

MCP Server

一个快速且易于配置的Model Context Protocol (MCP)服务器和客户端SDK,用于Rust语言开发,提供构建MCP客户端和服务器所需的一切功能。

工具数

1

提示词数

0

GitHub Stars

5

资源数

0
Rust高性能AI代理

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

RomanEmreis

提供方

RomanEmreis

最后核验

2026/5/17 20:52

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

尼瓦河

速度极快,易于配置 模型上下文协议(MCP) Rust的服务器和客户端SDK。 通过简单的配置和符合人体工程学的API,它提供了快速构建MCP客户端和服务器所需的一切, 完全符合最新的MCP规范。

![latest](https://crates.io/crates/neva) ![latest](https://releases.rs/docs/1.90.0/) ![License: MIT](https://github.com/RomanEmreis/neva/blob/main/LICENSE) ![CI](https://github.com/RomanEmreis/neva/actions/workflows/rust.yml) ![Release](https://github.com/RomanEmreis/neva/actions/workflows/release.yml)

💡 备注:此项目当前处于预览阶段。如有重大变更,恕不另行通知。

主要特点

  • 客户端和服务器SDK -一个库,用于构建具有Rust功能的MCP客户端和服务器。
  • 演出 -异步和东京供电。
  • 运输 - 标准 用于本地集成和 可流式传输的HTTP 用于远程双向通信。
  • 工具, 资源 & 提示 -为定义和使用主要MCP实体提供全方位支持。
  • 身份验证和授权 -承载令牌身份验证、基于角色的访问控制等,以适应高安全标准。
  • 结构化数据 -输出验证、嵌入式资源和开箱即用的资源链接。
  • 规格对齐 -旨在跟踪最新的MCP规范并涵盖其核心功能。

快速开始

MCP客户端

依赖项

[dependencies]
neva = { version = "0.3.2", features = ["client-full"] }
tokio = { version = "1", features = ["full"] }

代码

use neva::prelude::*;

#[tokio::main]
async fn main() -> Result {
    let mut client = Client::new()
        .with_options(|opt| opt
            .with_stdio("npx", ["-y", "@modelcontextprotocol/server-everything"])
            .with_timeout(Duration::from_secs(5)));
    
    client.connect().await?;

    // List tools
    let tools = client.list_tools(None).await?;
    for tool in tools.tools {
        println!("- {}", tool.name);
    }

    // Call a tool
    let args = [
        ("message", "Hello MCP!")
    ];
    let result = client.call_tool("echo", args).await?;
    println!("{:?}", result.content);

    client.disconnect().await
}

MCP服务器

依赖项

[dependencies]
neva = { version = "0.3.2", features = ["server-full"] }
tokio = { version = "1", features = ["full"] }

代码

use neva::prelude::*;

#[tool(descr = "A say hello tool")]
async fn hello(name: String) -> String {
    format!("Hello, {name}!")
}

#[resource(uri = "res://{name}", descr = "Some details about resource")]
async fn get_res(name: String) -> ResourceContents {
    ResourceContents::new(format!("res://{name}"))
        .with_mime("plain/text")
        .with_text(format!("Some details about resource: {name}"))
}

#[prompt(descr = "Analyze code for potential improvements")]
async fn analyze_code(lang: String) -> PromptMessage {
    PromptMessage::user()
        .with(format!("Language: {lang}"))
}

#[tokio::main]
async fn main() {
    App::new()
        .with_options(|opt| opt
            .with_stdio()
            .with_name("Sample MCP server")
            .with_version("1.0.0"))
        .run()
        .await;
}

目录标签

目录标签

Rust高性能AI代理Rust开发本地部署MCP协议服务器SDK客户端SDK

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP