Repository navigation
Inventory Planning Agentic: fix Challenge 6 MCP step with a stdio client - #613
Open
Digvijay (Digvijay) wants to merge 1 commit into
Open
Digvijay (Digvijay) wants to merge 1 commit into
Digvijay (Digvijay) wants to merge 1 commit into
Conversation
…r isn't run by hand - Add src/mcp_client.py: launches mcp_server.py over stdio and calls inject_signal - Challenge 6 Part C, walkthrough, READMEs: use the client; explain the 'Invalid JSON' error - Cap mcp<2 (2.x removes FastMCP); lock still pins 1.30.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fatih (fatihdurgut)
approved these changes
Nov 12, 2026
Author
|
Fatih (@fatihdurgut) - i would request Marco Weber (@qxsch) for review and merge - I can not do it myself |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a Challenge 6 (stretch) blocker in Agentic Inventory Planning, reported by Fatih Durgut while preparing a delivery.
Problem
Part C told participants to open a second terminal and run:
mcp_server.pyis a stdio MCP server: it starts and silently waits for JSON-RPC messages from an MCP client on stdin. Run by hand, it looks hung, and pressing Enter sends a blank line, which produces:The challenge never gave participants an MCP client, so they couldn't complete Part C.
Changes
src/mcp_client.py: a minimal MCP client built on themcppackage the hack already depends on. It launchesmcp_server.pyas a child process over stdio, lists its tools and callsinject_signal.mcp_server.pyby itself (Ctrl+C to stop it)solution-06.md: client command plus a coach note explaining the error.mcp_server.pydocstring,src/README.md, hack README layout: mention the client.mcp>=1.2.0,<2:mcp2.x removesmcp.server.fastmcp.FastMCP, which the server uses.uv.lockalready pins 1.30.0, so current labs are unaffected, but the open range would break if the lock were ever regenerated. The lock change is only the specifier line;uv lock --checkpasses offline, souv syncdoesn't re-resolve.Verified
With
mcp1.30.0 (the locked version), using a stubinventory_storeinstead of Cosmos:mcp_client.pystarts the server, findsinject_signal, calls it and exits 0.mcp_server.pyby hand and sending an empty line reproduces the reported error exactly.mcp2.x the server fails to importFastMCP, which confirms the cap is needed.Not tested live: the real Cosmos write and the console's change-feed reaction. The client calls the same
append_signalpath that the console's ⚡ Inject signal button already uses.Workaround until merged: use the ⚡ Inject signal button in the console (Part B), which triggers the same reaction.