Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC510 Lecture 20

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

CSC510 Lecture 20

MCP
(20261019)

Avatar for Javier Gonzalez-Sanchez

Javier Gonzalez-Sanchez PRO

October 22, 2026

Transcript

  1. CSC 5100 Modern Software Engineering Lecture 20. Model Context Protocol

    Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.phd ffi o ce: 14 -227
  2. The problem We already have an HTTP API. How can

    Claude use it? USER EXISTING SERVICE EXPECTED ANSWER “Convert 86°F to Celsius.” GET /5100/temperature { "result": 30.0 } value=86&from=F&to=C
  3. The existing REST contract No changes to TemperatureLambda are required.

    GET https://api.javiergs.phd/5100/temperature?value=86&from=F&to=C HTTP 200 { "value": 86.0, "from": "F", "to": "C", "result": 30.0 }
  4. MCP is a restaurant menu The waiter selects a dish;

    the kitchen prepares it. Customer Waiter Menu User request Claude MCP tool list Order Kitchen Dish MCP tool call Lambda / REST API Tool result
  5. A menu needs descriptions A name alone may not explain

    what a tool does. BAD MENU USEFUL MENU Dish 1 convert_temperature Dish 2 “Convert Fahrenheit and Celsius” Dish 3 Inputs: value, from, to
  6. MCP: two operations Discovery first. Invocation second. 1 tools/list 2

    tools/call Server advertises tool names, descriptions, and input schemas. Claude chooses a tool and supplies validated arguments. Claude chooses the tool. The server executes it.
  7. Case A — Build We implement the MCP translation layer

    in Java. CLAUDE DESKTOP CloudMcpServer.java REST → LAMBDA MCP over stdio Java MCP SDK API Gateway HttpClient TemperatureLambda Claude → Java JAR → HTTP GET → Lambda
  8. Build: launch the JAR from Claude Claude Desktop starts the

    Java process and talks over stdio. "mcpServers": { "csc5100": { "command": "/usr/bin/java", "args": ["-jar", ".../mcp/target/mcp-1.0.jar"] } } f a a a a ~/Libr ry/Applic tion Support/Cl ude/cl ude_desktop_con ig.json
  9. Build: follow one request Same menu → order → kitchen

    → dish. 1 Claude discovers convert_temperature 2 Claude calls with 86, F, C 3 Java callback sends HTTP GET 4 Lambda returns result: 30.0 5 Claude answers “30°C”
  10. Build: the observed edge case Claude first tried long unit

    names, then retried. FIRST CALL RETRY from = "fahrenheit" from = "F" to = "celsius" to = "C" REST API → HTTP 400 REST API → 30.0 Better schemas: enum [F, C] avoids guessing.
  11. CSC 5100 Modern Software Engineering Javier Gonzalez-Sanchez, Ph.D. [email protected] Fall

    2026 Copyright. These slides may be used only as study material for CSC 5100 within the California State University system. They may not be distributed or used for any other purpose.