Building My First MCP Server: Two Silent Bugs That Broke Everything
Grand_Day_5286 · reddit · 2026-08-02
A developer shared lessons from building scorm-mcp-server, detailing two silent bugs that rendered the tool useless:
- The ZodObject Trap: Passing z.object() instead of the raw shape to the SDK publishes an empty JSON schema, causing strict clients to silently strip all arguments. The fix is to remove z.object().
- Unexpanded Variables: Using ${HOME} in the MCPB manifest can result in the literal string being passed if the user leaves the field empty, causing ENOENT errors. The server should expand host variables itself.
The developer also recommended adding a no-arg selftest tool for quick debugging, keeping stdout pure JSON-RPC to avoid hanging the client, and ensuring fetch timeouts cover the entire response body.
More from coding & agent
- Rust Update Boosts Clippy Performance by Over 20% — charliermarsh · 2026-08-02
- Optimizing UI Rendering for LLM Streaming: Incremental Updates, Throttling, and Lightweight Components — dotey · 2026-08-02
- Dev Jokes About Switching Side Projects Weekly from Codex's POV — haydendevs · 2026-08-02
- DuckTap: Deterministically Generate MCP Servers from OpenAPI Specs Without LLMs — zanni098 · 2026-08-02
- FaceFusionYu Released: Native ComfyUI Nodes for Local Face Swapping — Friendly-Fig-6015 · 2026-08-02
- Vibe Coding in Action: Building 3D Scene Apps with Roblox Cloud APIs — rms80 · 2026-08-02