An MCP (Model Context Protocol) server written in Rust, hand-rolled over JSON-RPC 2.0/stdio. It exposes 4 tools that call real external APIs (Render, Vercel, Buffer, Firestore, Gmail), plus the public HTTP demo above so anyone can try it from a browser without running an MCP client.
Tools
Each tool degrades gracefully when its API key isn't configured — it reports an empty/configuration_error state instead of crashing.
Two entry points, one shared implementation
src/main.rs— the MCP server. JSON-RPC 2.0 over stdin/stdout, for real MCP clients (Claude Desktop/Code) with real credentials in.env.src/bin/web_server.rs— the public web demo. An Axum HTTP server exposing the same 4 tools asPOST /api/*, plus a static page at/. Refuses to start unlessDEMO_MODE=true— this binary has no auth, so it must never be able to reach real accounts.
Both call the same tool implementations in src/tools.rs — nothing is duplicated between them.
Demo Mode
Set DEMO_MODE=true and every tool returns realistic fixture data instead of calling a real account. send_gmail in demo mode simulates a send and never actually delivers mail. This is what the public deployment runs — no real credentials are set on that Render service at all.
Quick Start
# Build both binaries
cargo build --release
# Run the stdio MCP server (for a real MCP client, with real .env credentials)
cp .env.example .env # fill in whichever keys you have
./target/release/agentic-rust-mcp
# Run the web demo locally
DEMO_MODE=true PORT=8080 ./target/release/web_server
MCP Protocol Usage
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "agency_pulse", "arguments": {}}}
{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "send_gmail", "arguments": {"to": "[email protected]", "subject": "hi", "body": "hello"}}}
Security
- Credentials load from
.env(gitignored) viadotenv— nothing hardcoded. - The public web demo can never reach real accounts: it hard-exits at startup unless
DEMO_MODE=true, and no real keys are ever set on that deployment. - No authentication layer exists on the web demo's API routes — it's read-only fixture data by design, not a production API surface.
Logging
Structured JSON logs via tracing:
RUST_LOG=info ./target/release/agentic-rust-mcp
RUST_LOG=debug ./target/release/agentic-rust-mcp
Architecture
MCP client (stdio) Browser (public demo)
│ │
▼ ▼
src/main.rs src/bin/web_server.rs
(JSON-RPC 2.0) (Axum, DEMO_MODE-gated)
│ │
└──────────────┬─────────────┘
▼
src/tools.rs
(agency_pulse, content_check,
data_vault, send_gmail)
│
┌────────┬────────┬────────┬────────┐
▼ ▼ ▼ ▼ ▼
Render Vercel Buffer Firestore Gmail
Tech Stack
License
MIT
Author
Chris Brown Albatross AI Portfolio