rust-mcp-server-syncable-cli 0.1.1

High-performance Model Context Protocol (MCP) server for code analysis, security scanning, and project insights.
Documentation

mcp-rust-server

Crates.io License: MIT

High-performance Model Context Protocol (MCP) server for code analysis, security scanning, and project insights—written in Rust 🦀.


Table of Contents


Features

  • Fast & Scalable: Built with async Rust on the Tokio runtime
  • Multi-Protocol: Supports both stdio and SSE (Server-Sent Events) transports
  • Security Scanning: Static analysis and vulnerability detection
  • Extensible: Easily add new MCP handlers and custom tools
  • Production-Ready: Optimized release profile, structured logging, and CI integration

Installation

mcp-rust-server is published on crates.io. You need a recent Rust toolchain (1.70+ recommended).

CLI Binaries

cargo install rust-mcp-server-syncable-cli

This installs two binaries into your Cargo bin directory (usually ~/.cargo/bin):

  • mcp-stdio — stdin/stdout-based MCP server
  • mcp-sse — HTTP/SSE-based MCP server

Library

Add to your project’s Cargo.toml:

[dependencies]
rust-mcp-server-syncable-cli = "0.1.0"

Usage

CLI Binaries

# Run the stdio-based server
mcp-stdio

# Run the SSE-based server
mcp-sse

By default, both servers will:

  1. Read framed MCP requests (JSON-RPC) from the chosen transport
  2. Dispatch to your registered handlers
  3. Write framed MCP responses

Library

use rust_mcp_server_syncable_cli::{start_stdio, start_sse};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Run as a stdio server
    start_stdio().await?;

    // Or run as an HTTP/SSE server
    // start_sse().await?;

    Ok(())
}
  • start_stdio() initializes logging, registers tools, and listens on stdin/stdout.
  • start_sse() spins up an HTTP server at http://0.0.0.0:8000/mcp and streams MCP responses.

Documentation

Full API documentation is generated on docs.rs:

cargo doc --open

Contributing

Contributions are welcome! Please:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/your-feature)
  3. Commit your changes (git commit -m "Add feature")
  4. Push to your fork (git push origin feat/your-feature)
  5. Open a pull request

Run tests and lint before submitting:

cargo test
cargo fmt -- --check
cargo clippy -- -D warnings

License

Licensed under the MIT License. See [LICENSE] for details.


Acknowledgments