Skip to content

ryo33/mmcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMCP

GitHub MIT/Apache 2.0 Crates.io docs.rs GitHub Repo stars

A modular, minimalistic and macro-powered MCP (Model Context Protocol) framework for Rust.

Examples

mmcp = { version = "0.1", features = ["server-stdio"] }
uuid = { version = "1", features = ["v4"] }
tokio = { version = "1", features = ["full"] }
use mmcp::{
    server::{MCPServer, primitives::tool::Text, stdio_server_rpc},
    tool,
};
use uuid::Uuid;

/// Generate a UUID
#[tool]
fn generate_uuid() -> Text<Uuid> {
    Text(Uuid::new_v4())
}

/// Generate multiple UUIDs
#[tool]
fn generate_uuid_many(count: usize) -> Vec<Text<Uuid>> {
    (0..count).map(|_| generate_uuid()).collect()
}

#[tokio::main]
async fn main() {
    MCPServer::new("mmcp-uuid", env!("CARGO_PKG_VERSION"))
        .with_tools_from_inventory()
        .start(stdio_server_rpc())
        .await
        .unwrap();
}

Implementation Status

  • STDIO server implementation
  • Protocol definitions
  • Tool macros
  • RPC implementation
  • HTTP transport with Axum
  • Client implementation
  • Authentication
  • Logging
  • Schemars 0.8 support
  • Support more MCP functionalities

Development

{
	"mcpServers": {
		"mmcp-uuid": {
			"command": "cargo",
			"args": [
				"run",
				"--manifest-path",
				"/path/to/mmcp/Cargo.toml",
				"-p",
				"mmcp-uuid"
			]
		}
	}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages