Content
# Local Models & MCP — a hands-on tech talk
A self-contained tech talk (slides **and** working code) about running LLMs locally and about the
**Model Context Protocol (MCP)**. The centerpiece is a tiny *custom MCP server about the talk itself*:
it drives the slide deck's live audience-question board, and a companion CLI shows that **MCP and a plain
REST API are the same thing in different envelopes**.
## What's inside
| Path | What it is |
|------|------------|
| `demo-mcp/present.html` | The slide deck + live question board + table of contents, as **one web app**. Served by the dashboard; also opens standalone in a browser. |
| `demo-mcp/talk_server.py` | The **MCP server** (FastMCP). Tools: overview, agenda, set current slide, add/list/answer questions. |
| `demo-mcp/dashboard.py` | Zero-dependency HTTP server: serves the deck, a small REST API (`/api/*`), and the board endpoints. |
| `demo-mcp/cli.py` | A client that hits the same server over **REST or MCP**, plus a `compare` command that shows both side by side. |
| `demo-mcp/store.py` | Shared JSON state with atomic writes + the view formatters used by **both** the MCP tools and the REST API. |
| `demo-mcp/server.py` | A second minimal MCP server used to demo **prompt injection** (educational). |
| `TALK_RUNBOOK.md` | The full speaker script — talking points, demo steps, fallbacks, Q&A bank. |
## Prerequisites
- [**uv**](https://docs.astral.sh/uv/) — manages Python and dependencies (and installs Python 3.12 for you).
- An **MCP-capable agent** to drive the server live: [Claude Code](https://claude.com/claude-code),
[OpenAI Codex](https://developers.openai.com/codex/), GitHub Copilot (VS Code), or [LM Studio](https://lmstudio.ai/) 0.3.17+.
## Quick start
```bash
git clone <your-repo-url>
cd <repo>/demo-mcp
uv sync # create the venv + install the MCP SDK
uv run dashboard.py # serve the presentation + question board
```
Open **http://localhost:8765** — slides in the center, contents on the left, the question queue on the right.
Controls: `←`/`→` navigate · `T`/`Q` toggle panels · `P` focus mode · `F` fullscreen.
> No server? `demo-mcp/present.html` also opens directly in a browser (double-click). The slides work; the
> question panel just stays empty.
## Connect the MCP server to your agent
This repo ships ready-made configs, so most agents wire up the `talk` server **automatically** when you open the folder:
| Agent | Config in this repo | Notes |
|-------|---------------------|-------|
| Claude Code | `.mcp.json` | prompts you to approve the project server on first use |
| GitHub Copilot / VS Code | `.vscode/mcp.json` | appears in Agent mode → click **Start** |
| OpenAI Codex | `.codex/config.toml` | run in a **trusted** project (Codex will ask) |
| LM Studio | manual (below) | built-in MCP client since v0.3.17 |
All three configs launch the server with `uv --directory demo-mcp run talk_server.py` (relative path — start
your agent from the **repo root**). `uv` must be on your `PATH`.
**LM Studio** — open **Program → Install → Edit mcp.json** (or edit `%USERPROFILE%\.lmstudio\mcp.json`) and add:
```json
{
"mcpServers": {
"talk": {
"command": "uv",
"args": ["--directory", "C:\\full\\path\\to\\demo-mcp", "run", "talk_server.py"]
}
}
}
```
Use a **tool-capable model** (e.g. Qwen2.5-Instruct, Llama-3.1-Instruct). If `uv` isn't found, use its full path.
## The MCP tools
`get_talk_overview` · `get_agenda` · `set_current_section` · `add_question` · `list_questions` · `answer_question`
Once connected, ask your agent things like *"add a question: how big is a 70B model?"* and watch the board update live.
## MCP vs REST — see they're siblings
```bash
cd demo-mcp
uv run cli.py compare agenda # side-by-side REST vs MCP for the same call
uv run cli.py agenda --via api # fetch over REST
uv run cli.py agenda --via mcp # fetch over MCP
uv run cli.py ask "Your question?" --via mcp
```
`compare` prints both raw responses and confirms the payload is identical — the difference is that MCP adds
*discovery* (`tools/list`) and a *standard envelope*, so any client can use any server with no custom glue.
## The prompt-injection demo (educational)
`server.py`'s `get_meeting_notes` tool returns text with a **planted instruction**, to show that an agent
treats tool output as trusted context. It is intentional and harmless — a teaching example of why *every tool
result is untrusted input*. Don't deploy it anywhere real.
## Presenting
See [`TALK_RUNBOOK.md`](TALK_RUNBOOK.md) for the full speaker script, staging plan, and demo fallbacks.
## License
MIT — see [`LICENSE`](LICENSE).
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.