Loading video player...
An MCP server is how you give Claude Code a hand. In this episode I build a Python MCP server from scratch with two production-ready tools — a SELECT-guarded SQLite query tool and a path-bounded file read tool — wire both into Claude Code, and show the four failure modes that cause MCP tools to silently stop working. ───────────────────────────────────── 🔧 WHAT YOU'LL BUILD ───────────────────────────────────── ✅ SQLite query tool — SELECT-only guard at the tool level, JSON rows output, explicit error returns ✅ File read tool — path bounding so Claude can only read files in the allowed directory ✅ .claude.json wiring — mcpServers block, command/args/cwd/env fields, Windows path fix ✅ Logging template — the one habit that makes silent MCP failure debuggable ───────────────────────────────────── 📌 KEY CONCEPTS COVERED ───────────────────────────────────── • The three MCP primitives: Tools, Resources, Prompts — which one to use and when • FastMCP: the high-level Python interface that handles protocol boilerplate • claude mcp add vs. editing .claude.json directly — and why Windows paths need manual fixing • The four silent failure modes: server didn't start, tool not offered, output discarded, env mismatch • Real example: the PowerPoint MCP server that generated every deck in this series ───────────────────────────────────── ⏱️ TIMESTAMPS ───────────────────────────────────── 00:00 — What an MCP server adds (and how it differs from CLAUDE.md and hooks) 02:00 — The three MCP primitives: Tools, Resources, Prompts 04:30 — Minimal server structure: FastMCP, decorators, docstrings 07:30 — Tool 1: SQLite query tool (SELECT guard, JSON output, explicit errors) 11:00 — Tool 2: File read tool (path bounding, error handling) 13:30 — Wiring into Claude Code (.claude.json, Windows path fix) 16:00 — Four reasons MCP tools silently stop working 19:00 — Real example: the PowerPoint MCP server 21:00 — Key takeaways ───────────────────────────────────── 💻 CODE & RESOURCES ───────────────────────────────────── GitHub repo → https://github.com/ogu83/production-claude-code Branch → ep3-mcp-server MCP Python SDK → https://github.com/modelcontextprotocol/python-sdk Claude Code hooks docs → https://docs.anthropic.com/claude-code ───────────────────────────────────── 🤝 WORK WITH ME ───────────────────────────────────── I help engineering teams configure Claude Code for production use — CLAUDE.md architecture, hooks, MCP servers, and context management. Upwork profile → https://www.upwork.com/freelancers/oguzkoroglu ───────────────────────────────────── #ClaudeCode #MCPServer #AIEngineering #Anthropic #AITools #ProductionAI #SoftwareEngineering #DeveloperTools #LLM #AIWorkflow #DevProductivity #ClaudeAI #MCPProtocol #BeyondTheDeveloper #ClaudeCodeTips #PythonAI