Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

ยฉ 2026 TrackMCP. All rights reserved.

Built with โค๏ธ by Krishna Goyal

    Anet Mcp Server

    ๐Ÿš€ A high-performance Rust server for Model Control Protocol (MCP) with JSON-RPC 2.0, NATS messaging, async support, and pluggable AI tools.

    1 stars
    Rust
    Updated May 14, 2025

    Table of Contents

    • Features
    • Requirements
    • Installation
    • Getting Started
    • Running the Example Server
    • Testing the Server
    • Usage
    • Creating a Server
    • Implementing a Custom Tool
    • API Reference
    • Architecture
    • License

    Table of Contents

    • Features
    • Requirements
    • Installation
    • Getting Started
    • Running the Example Server
    • Testing the Server
    • Usage
    • Creating a Server
    • Implementing a Custom Tool
    • API Reference
    • Architecture
    • License

    Documentation

    Anet MCP Server

    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.

    ---

    Features

    • โœ… JSON-RPC 2.0 compatible API
    • ๐Ÿ”„ NATS transport layer for message passing
    • ๐Ÿ› ๏ธ Extensible tool system
    • ๐Ÿง  Support for prompts and resources
    • โšก Asynchronous request handling with Tokio

    ---

    Requirements

    • Rust 1.70+
    • NATS server running locally or accessible via network

    ---

    Installation

    Add the following to your Cargo.toml:

    toml
    [dependencies]
    anet_mcp_server = "0.1.0"

    ---

    Getting Started

    Running the Example Server

    The repository includes a basic example server that demonstrates core functionality:

    bash
    # 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

    Testing the Server

    You can test the server using the included test client:

    bash
    cargo run --example test_client

    This will send various requests to the server and print the responses.

    ---

    Usage

    Creating a Server

    rust
    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
    }

    ---

    Implementing a Custom Tool

    rust
    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) -> anyhow::Result> {
            Ok(vec![Content::Text {
                text: "Tool response".to_string()
            }])
        }
    }

    ---

    API Reference

    The server implements the following JSON-RPC methods:

    • initialize โ€“ Initialize the connection and get server information
    • listTools โ€“ Get a list of available tools
    • callTool โ€“ Call a specific tool with arguments
    • listResources โ€“ Get a list of available resources
    • readResource โ€“ Read a specific resource
    • listPrompts โ€“ Get a list of available prompts
    • getPrompt โ€“ Get a specific prompt with arguments

    ---

    Architecture

    The server follows a modular design:

    • server โ€“ Core server logic and request handling
    • transport โ€“ Message transport layer (currently NATS)
    • tools โ€“ Tool interfaces and implementations
    • types โ€“ Common data structures

    ---

    License

    MIT License

    code
    Let me know if you want badges, contribution guidelines, or example JSON-RPC payloads added to the README as well.

    Similar MCP

    Based on tags & features

    • IM

      Imagen3 Mcp

      Rustยท
      46
    • MC

      Mcp Access Point

      Rustยท
      135
    • WI

      Winx Code Agent

      Rustยท
      19
    • CO

      Code Assistant

      Rustยท
      103

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScriptยท
      22.1k
    • SE

      Serena

      Pythonยท
      14.5k
    • MC

      Mcp Playwright

      TypeScriptยท
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScriptยท
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • IM

      Imagen3 Mcp

      Rustยท
      46
    • MC

      Mcp Access Point

      Rustยท
      135
    • WI

      Winx Code Agent

      Rustยท
      19
    • CO

      Code Assistant

      Rustยท
      103

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScriptยท
      22.1k
    • SE

      Serena

      Pythonยท
      14.5k
    • MC

      Mcp Playwright

      TypeScriptยท
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScriptยท
      3.0k