Skip to content

DBuret/mcp-workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP worspace

Rust Version License

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, …​

1. Features

  • 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 Dockerfile to build the entire workspace, resulting in tiny FROM scratch images (~5MB).

2. MCP Servers

calc MCP Version Size

mcp-calc : A simple calculator using MCP to avoid LLM mistakes at basic arithmetic operations.

kroki MCP Version Size

mcp-kroki-bridge : A bridge to use Kroki

postgres MCP Version Size

mcp-pg-paitrimony : A bridge to use Postgres in my pAItrimony project

search MCP Version Size

mcp-searxng-bridge : A bridge to use searxng search engine & fetch web pages

3. Create a new server

  1. cp -r servers/template servers/mcp-new

  2. cd servers/mcp-new

  3. sed -i 's/template-bridge/mpc-new/g' Cargo.toml

  4. 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)

  5. add to workspace in root Cargo.toml

  6. Dokerfile : add section for the new server (cut’n paste template section, edit)

  7. cargo check

  8. build

docker buildx build  \
    --target mcp-new \
    -t mcp-new:latest \
    --platform linux/amd64 \
    --push \
    .

4. License

MIT License. See LICENSE for details. Note: Mentioning the author in credits is required for any redistribution.

5. AI assistance disclosure

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.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors