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>
This commit is contained in:
parent
1dca91e2be
commit
cc4aa751b6
1 changed files with 248 additions and 5 deletions
11
examples/calculator-rust/Dockerfile
Normal file
11
examples/calculator-rust/Dockerfile
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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"]
|
||||
Loading…
Reference in a new issue