Skip to content

A Rust-based implementation of the Model Context Protocol (MCP) framework, currently in development with comprehensive testing infrastructure and modular design.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

pulseengine/mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PulseEngine MCP

Rust framework for building Model Context Protocol servers and clients.

Crates.io Documentation CI codecov

Example

use pulseengine_mcp_macros::{mcp_server, mcp_tools};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct GreetParams {
    pub name: Option<String>,
}

#[mcp_server(name = "My Server")]
#[derive(Default, Clone)]
pub struct MyServer;

#[mcp_tools]
impl MyServer {
    /// Greet someone by name
    pub async fn greet(&self, params: GreetParams) -> anyhow::Result<String> {
        let name = params.name.unwrap_or_else(|| "World".to_string());
        Ok(format!("Hello, {name}!"))
    }
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    MyServer::configure_stdio_logging();
    MyServer::with_defaults().serve_stdio().await?.run().await
}

The #[mcp_server] and #[mcp_tools] macros generate the protocol implementation. Tool schemas are derived from your Rust types via JsonSchema.

Crates

Crate Description
mcp-protocol MCP types, JSON-RPC, schema validation
mcp-server Server infrastructure with McpBackend trait
mcp-client Client for connecting to MCP servers
mcp-transport stdio, HTTP, WebSocket transports
mcp-auth Authentication, API keys, OAuth 2.1
mcp-security Input validation, rate limiting
mcp-logging Structured logging with credential sanitization
mcp-macros #[mcp_server], #[mcp_tools], #[mcp_resource]

Examples

MCP Spec

Implements MCP 2025-11-25: tools, resources, prompts, completions, sampling, roots, logging, progress, cancellation, tasks, and elicitation.

License

MIT OR Apache-2.0

About

A Rust-based implementation of the Model Context Protocol (MCP) framework, currently in development with comprehensive testing infrastructure and modular design.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published