Rust MCP Core
A config-driven MCP server core built on the official Rust SDK. Define tools, auth, prompts, resources, and HTTP behavior in YAML or JSON configuration -- the library handles execution, validation, and protocol compliance with minimal Rust code.
What is Rust MCP Core?
Rust MCP Core is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to config-driven mcp server core built on the official rust sdk. define tools, auth, prompts, resources, and http behavior in yaml or json configuration -- the library handles execution, validation, and ...
A config-driven MCP server core built on the official Rust SDK. Define tools, auth, prompts, resources, and HTTP behavior in YAML or JSON configuration -- the library handles execution, validation, and protocol compliance with minimal Rust code.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A config-driven MCP server core built on the official Rust S
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx rust-mcp-coreConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Rust MCP Core
Rust MCP Core is a config-driven library for building MCP servers on top of the official Rust SDK. Rather than writing protocol boilerplate, developers declare tools, HTTP upstreams, authentication rules, prompts, and resources in a YAML or JSON file; the library handles execution, input validation, rate limiting, and full MCP protocol compliance. It supports both stdio and streamable HTTP transport modes.
Prerequisites
- Rust toolchain (stable) installed via rustup
- Tokio async runtime (pulled in automatically as a dependency)
- Cargo package manager (ships with Rust)
- For HTTP transport: network access on the configured port
- For authentication features: bearer token, JWT, or OAuth provider details
Add rust-mcp-core to your Cargo project
Create a new Rust binary project or add the dependency to an existing one. Reference the crate from crates.io or directly from GitHub.
cargo new my-mcp-server
cd my-mcp-server
# Add to Cargo.toml:
# [dependencies]
# rust-mcp-core = "0.1"
# Or from GitHub:
# rust-mcp-core = { git = "https://github.com/nullablevariant/rust-mcp-core" }Write the minimal main.rs
The entry point needs only a few lines. Load the YAML config file and call runtime::run_from_config — the library does the rest.
use rust_mcp_core::{load_mcp_config_from_path, runtime, PluginRegistry};
#[tokio::main]
async fn main() -> Result<(), rust_mcp_core::McpError> {
let config = load_mcp_config_from_path("config/mcp_config.yml".into())?;
runtime::run_from_config(config, PluginRegistry::new()).await
}Create the YAML configuration file
Define the server transport, upstream HTTP APIs, and tools in config/mcp_config.yml. Environment variables can be injected using the ${env:VAR_NAME} syntax.
version: 1
server:
host: 0.0.0.0
port: 3000
endpoint_path: /mcp
transport:
mode: streamable_http
auth:
enabled: false
logging:
level: info
upstreams:
api:
base_url: ${env:API_BASE_URL}
tools:
items:
- name: api.list_items
description: List items from the upstream API
input_schema:
type: object
properties:
query:
type: string
execute:
type: http
upstream: api
method: GET
path: /items
query:
q: "${query}"Build with the appropriate feature flags
Select only the features your server needs. The default build includes streamable HTTP support. Add auth, http_hardening, or other features as required.
# Default build (streamable HTTP included)
cargo build --release
# Minimal build: stdio transport only
cargo build --release --no-default-features
# Selective features
cargo build --release --no-default-features --features http_tools,auth,promptsRegister the server in your MCP client
Point your MCP client at the running HTTP endpoint or configure it to launch the binary via stdio transport.
{
"mcpServers": {
"my-rust-server": {
"command": "/path/to/my-mcp-server/target/release/my-mcp-server",
"args": [],
"env": {
"API_BASE_URL": "https://api.example.com"
}
}
}
}Rust MCP Core Examples
Client configuration
Claude Desktop configuration for a rust-mcp-core binary running in stdio mode. Set any upstream API URLs via environment variables.
{
"mcpServers": {
"my-rust-mcp": {
"command": "/home/user/my-mcp-server/target/release/my-mcp-server",
"args": [],
"env": {
"API_BASE_URL": "https://internal-api.example.com",
"RUST_LOG": "info"
}
}
}
}Prompts to try
Once tools are declared in your YAML config, you can invoke them through the AI client naturally.
- "List all items matching the query 'invoices' from the API"
- "Call the api.list_items tool with query set to 'active users'"
- "What tools are available in this MCP server?"
- "Use the HTTP tool to fetch data from the upstream and summarize the results"Troubleshooting Rust MCP Core
Compilation fails with 'feature not found' or missing dependency errors
Ensure your Rust toolchain is up to date (rustup update stable). Check that the feature flags in your Cargo.toml match those documented in the repository — feature names are case-sensitive. Run cargo check before a full build to see detailed errors.
Environment variable substitution (${env:VAR}) is not working in YAML config
The variable must be set in the environment before the binary starts. If using Claude Desktop, set it in the env block of the mcpServers config object. Verify with echo $VAR_NAME in your shell to confirm the variable is exported.
HTTP transport mode returns connection refused errors
Confirm the host and port in mcp_config.yml are not blocked by a firewall or already in use by another process. For local development use 127.0.0.1 instead of 0.0.0.0. Run lsof -i :3000 (macOS/Linux) to check port availability.
Frequently Asked Questions about Rust MCP Core
What is Rust MCP Core?
Rust MCP Core is a Model Context Protocol (MCP) server that config-driven mcp server core built on the official rust sdk. define tools, auth, prompts, resources, and http behavior in yaml or json configuration -- the library handles execution, validation, and protocol compliance with minimal rust code. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Rust MCP Core?
Follow the installation instructions on the Rust MCP Core GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Rust MCP Core?
Rust MCP Core works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Rust MCP Core free to use?
Yes, Rust MCP Core is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Rust MCP Core Alternatives — Similar Developer Tools Servers
Looking for alternatives to Rust MCP Core? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Rust MCP Core in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Rust MCP Core?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.