mcpb/examples/calculator-rust/Dockerfile
Bryan Thompson cc4aa751b6
feat: add Rust binary calculator example
First example of the binary server type — a compiled Rust MCP server
packaged as an MCPB. Based on the official Rust SDK calculator example
(rmcp 1.2.0, 2 tools: sum/sub, ~80 LOC).

Includes Cargo.toml, Dockerfile for Docker-based builds, .mcpbignore
to exclude source from the bundle, and README with build/pack/test
instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 16:36:47 -05:00

11 lines
241 B
Docker

FROM rust:1.94-bookworm AS builder
WORKDIR /app
COPY Cargo.toml ./
COPY src/ ./src/
RUN cargo build --release
FROM debian:bookworm-slim
COPY --from=builder /app/target/release/mcp-calculator /mcp-calculator
ENTRYPOINT ["/mcp-calculator"]