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>
11 lines
241 B
Docker
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"]
|