cargo pmcp

Build, Test & Deploy MCP Servers

๐Ÿฆ€ + ๐Ÿค– = โค๏ธ

Press Space to navigate | S for speaker notes

Today's Journey

1 Myth Busting: MCP Beyond Local Dev
2 DEMO Chess MCP Server
3 Why Rust? Security ยท Performance ยท Cost
4 Myth Busting: Resources & Prompts
5 DEMO re:Invent Agenda Helper
6 DEMO Build Your First MCP Server
7 DEMO Deploy to AWS Lambda
8 Security: OAuth is the Standard
9 DEMO Interactive Fiction with OAuth

Myth #1

๐Ÿค”

"MCP servers are for local development
and software developers only"

BUSTED!

โ˜๏ธ

Cloud-Native

๐Ÿข

Enterprise Ready

๐Ÿ‘จโ€โš•๏ธ

Any Domain

๐Ÿ”’

OAuth Security

๐Ÿ“ฑ

Any Client

๐ŸŒ

Global Scale

Chess MCP Server DEMO

What Just Happened?

๐ŸŽฎ A game - not a developer tool

โ˜๏ธ Running on AWS Lambda - not locally

๐ŸŒ Accessible via HTTP - any client can connect

๐Ÿฆ€ Built with cargo-pmcp in minutes

Why Rust?

๐Ÿฆ€

๐Ÿ”’ Security

SQL Injection

Buffer Overflow

Use After Free

Null Pointer

Compile-time guarantees

If it compiles, it's safe

๐Ÿ–ฅ๏ธ Remote MCP: No code downloaded or executed on your machine

โšก Performance

~2ms cold start

vs 200-500ms for Python/Node.js

๐Ÿ’ฐ Cost

๐Ÿ“ฆ

~3MB binary

No runtime needed

๐Ÿง 

Minimal RAM

128MB is plenty

โฑ๏ธ

Fast execution

Lower Lambda bills

๐Ÿค– Best Compiler for AI

โœ“ Detailed error messages

โœ“ Suggests exact fixes

โœ“ Catches bugs at compile time

โœ“ Strict type checking

AI + Rust Compiler

= Fewer iterations to working code

๐Ÿ’ก The compiler tells the AI exactly what's wrong and how to fix it

Myth #2

๐Ÿ”ง

"MCP is just about Tools"

BUSTED!

The MCP Trinity

๐Ÿ”ง

Tools

Actions the AI can take

๐Ÿ“š

Resources

Data the AI can read

๐Ÿ’ฌ

Prompts

Templates for complex tasks

๐Ÿ’ก Prompts = Help your AI client use your server correctly!

๐Ÿ“– Learn More: pmcp-book

๐Ÿ“ก

Protocol

๐Ÿ””

Notifications

๐Ÿšซ

Cancellations

๐Ÿ”—

Middleware

๐Ÿ“ฑ

MCP App

๐ŸŽ“

Advanced

re:Invent Agenda DEMO

๐Ÿ“…

Using Prompts to build a full day agenda

The Prompt

Plan my re:Invent day on {topic}

Include:
- Sessions matching my interests
- Travel time between venues
- Lunch and break suggestions
- Networking opportunities

One prompt. Complete day planned. โœจ

Let's Build! DEMO

๐Ÿ› ๏ธ

Advanced Calculator with Quadratic Equation Solver

Step 1: Create Workspace

$ cargo pmcp new my-mcp-servers

$ cd my-mcp-servers

Workspace created with shared components ๐Ÿ“

Step 2: Add Calculator Server

$ cargo pmcp add server calculator --template complete

Full calculator with tools + prompts! ๐Ÿงฎ

Templates: minimal | calculator | complete

What You Get: SequentialWorkflow

SequentialWorkflow::new("solve_quadratic", "Solve axยฒ + bx + c = 0")
  .argument("a", "Coefficient of xยฒ", true)
  .argument("b", "Coefficient of x", true)
  .argument("c", "Constant term", true)
  // Guide the AI with instructions
  .instruction(InternalPromptMessage::system(
      "Use calculator tools: power, multiply, subtract, sqrt...
       Show your work step by step. Coefficients: a={a}, b={b}, c={c}"
  ))
  // Fetch educational resource
  .step(WorkflowStep::fetch_resources("fetch_guide")
      .with_resource("calculator://help/quadratic-formula")?)

Resources + Instructions = Guided AI

Two Prompts, Same Goal

solve_quadratic

SequentialWorkflow

โœ… Fetches resources

โœ… Guides AI with instructions

โœ… Declarative

quadratic_simple

SimplePrompt

โœ… Self-contained

โœ… Pre-computed answer

โœ… Custom logic

Same user experience. Different implementation. ๐ŸŽฏ

Test Locally DEMO

$ cargo pmcp dev

Server running. Claude Code connected. ๐Ÿ”Œ

Try it!

Solve xยฒ - 5x + 6 = 0

Answer: x = 2 or x = 3 โœ“

Deploy to AWS DEMO

$ cargo pmcp deploy --target aws-lambda

โ˜๏ธ

One command. Production ready.

What Just Happened?

โœ… Cross-compiled for AWS Lambda

โœ… Created CloudFormation stack

โœ… Deployed Lambda function

โœ… Set up API Gateway

โœ… Got public HTTPS endpoint

All in ~30 seconds

Test Remotely DEMO

Same Claude Code. Same experience.

Now running on AWS Lambda ๐ŸŒ

๐Ÿ’ก Your users don't install anything.
They just connect to your endpoint.

What About Security?

๐Ÿ”

OAuth 2.0 is the Standard

User โ†’ MCP Client โ†’ OAuth Provider โ†’ MCP Server

โœ… Industry standard authentication

โœ… No passwords in your server

โœ… Works with any OAuth provider

โœ… Built into cargo-pmcp

Interactive Fiction DEMO

๐ŸŽฎ

OAuth-protected text adventures

The Flow

1๏ธโƒฃ Connect to IF Games server

2๏ธโƒฃ OAuth redirect โ†’ Login

3๏ธโƒฃ Token received โ†’ Authenticated

4๏ธโƒฃ Play your adventure! ๐Ÿ—ก๏ธ

What We Learned

๐Ÿš€ MCP servers are production-ready

๐Ÿฆ€ Rust = Security + Performance + Low Cost

๐Ÿ’ฌ Prompts & Resources are powerful, not just tools

โ˜๏ธ One command from code to cloud

๐Ÿ” OAuth built in for enterprise security

Get Started Today

$ cargo install cargo-pmcp

$ cargo pmcp new my-server

$ cargo pmcp dev

github.com/paiml/rust-mcp-sdk

Questions?

๐Ÿฆ€ ๐Ÿค– โค๏ธ

Thank you!