π A high-performance Rust server for Model Control Protocol (MCP) with JSON-RPC 2.0, NATS messaging, async support, and pluggable AI tools.
Config is the same across clients β only the file and path differ.
{
"mcpServers": {
"anet-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Rust implementation of the Model Control Protocol (MCP) server that enables communication between clients and AI models via a standardized protocol.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories β click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience β it helps other developers decide.
Sign in to write a review.
Others in developer-tools
Manage Supabase projects β databases, auth, storage, and edge functions
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP Security Weekly
Get CVE alerts and security updates for Anet Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Rust implementation of the Model Control Protocol (MCP) server that enables communication between clients and AI models via a standardized protocol.
This project provides a scalable and asynchronous framework for building AI services using Rust, Tokio, and NATS. It is designed for developers building AI agent systems, LLM-based tools, or custom JSON-RPC 2.0 service layers. The architecture supports real-time message passing, making it ideal for microservices, AI orchestration, and tool-based model interaction.
Add the following to your Cargo.toml:
[dependencies]
anet_mcp_server = "0.1.0"
The repository includes a basic example server that demonstrates core functionality:
# Start a NATS server in another terminal or ensure one is already running
# Example:
nats-server
# Run the example server
cargo run --example basic_server
You can test the server using the included test client:
cargo run --example test_client
This will send various requests to the server and print the responses.
use anet_mcp_server::{
ServerBuilder, ServerCapabilities,
transport::nats::NatsTransport,
};
use serde_json::json;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let transport = NatsTransport::new("nats://localhost:4222", "mcp.requests").await?;
let server = ServerBuilder::new()
.transport(transport)
.name("my-mcp-server")
.version("0.1.0")
.capabilities(ServerCapabilities {
tools: Some(json!({})),
prompts: Some(json!({})),
resources: Some(json!({})),
notification_options: None,
experimental_capabilities: None,
})
.build()?;
server.run().await
}
use anet_mcp_server::{Content, Tool};
use async_trait::async_trait;
use serde_json::{json, Value};
struct MyTool;
#[async_trait]
impl Tool for MyTool {
fn name(&self) -> String {
"my_tool".to_string()
}
fn description(&self) -> String {
"A custom tool".to_string()
}
fn input_schema(&self) -> Value {
json!({
"type": "object",
"properties": {
"input": { "type": "string" }
}
})
}
async fn call(&self, input: Option<Value>) -> anyhow::Result<Vec<Content>> {
Ok(vec![Content::Text {
text: "Tool response".to_string()
}])
}
}
The server implements the following JSON-RPC methods:
initialize β Initialize the connection and get server informationlistTools β Get a list of available toolscallTool β Call a specific tool with argumentslistResources β Get a list of available resourcesreadResource β Read a specific resourcelistPrompts β Get a list of available promptsgetPrompt β Get a specific prompt with argumentsThe server follows a modular design:
MIT License
Let me know if you want badges, contribution guidelines, or example JSON-RPC payloads added to the README as well.