An implementation of the Model Context Protocol (MCP) for AI agents
Built with Rust for speed, reliability & minimal footprint ( < 5 Mb ).
Unlike standard MCP servers using stdio, these MCP servers operate over the network:
-
SSE (Server-Sent Events) with a Hybrid Response mode, making it compatible with clients like LM Studio.
-
/mpc POST, modern version of the protocol, making it compatible with clients like open WebUI, AnythingLLM, …
-
Network-Ready: Connect via SSE/HTTP or MCP Streaming; no local child-process management required.
-
Workspace Architecture: Scalable Rust monorepo design allowing multiple independent MCP agents to share the same reliable core networking stack without code duplication. Each mcp server code focus on its business logic only
-
Modern Rust: Leveraging Edition 2024, the Axum/Tokio ecosystem, strongly-typed environment configurations (envy), and tunable logging level (tracing).
-
Rusr workspace: MCP servers share a commmon boilerplate
-
Docker Optimized: Single multi-stage
Dockerfileto build the entire workspace, resulting in tinyFROM scratchimages (~5MB).
mcp-calc : A simple calculator using MCP to avoid LLM mistakes at basic arithmetic operations. |
|
mcp-kroki-bridge : A bridge to use Kroki |
|
mcp-pg-paitrimony : A bridge to use Postgres in my pAItrimony project |
|
mcp-searxng-bridge : A bridge to use searxng search engine & fetch web pages |
-
cp -r servers/template servers/mcp-new
-
cd servers/mcp-new
-
sed -i 's/template-bridge/mpc-new/g' Cargo.toml
-
Edit:
-
config.rs (env vars)
-
handlers.rs (mcp tools)
-
main.rs
-
function list_tools: your tools definitions
-
function call_tools: call of your business functions (in handlers.rs)
-
-
Cargo.toml (additionnal crates needed by your business logic)
-
-
add to workspace in root Cargo.toml
-
Dokerfile : add section for the new server (cut’n paste template section, edit)
-
cargo check
-
build
docker buildx build \
--target mcp-new \
-t mcp-new:latest \
--platform linux/amd64 \
--push \
.MIT License. See LICENSE for details. Note: Mentioning the author in credits is required for any redistribution.
This project includes AI-assisted code and documentation. The maintainer reviews and tests changes, however the software is provided "as is" and may contain errors. Use at your own risk; validate in your environment before production use.
Created by DBuret. Part of the pAItrimony services suite.



