Run Stock Desk locally
Use Node.js 22 or later. Unzip the demo, open a terminal in the mcp-stock-desk folder, and run these commands.
npm ci
npm run build
npm start
Open the http://127.0.0.1 address and port shown in the terminal. The demo uses three fixed stock items and runs on your computer. It requires no account, API key or model call. Press Ctrl+C in the terminal to stop it.
Try the export choices
Select Export CSV. The demo asks Which separator does your spreadsheet expect?
- Semicolon or Comma. Choose a separator, then select Download CSV. The file has a header and three stock rows. The sample CSV above uses semicolons.
- Cancel. Start another export and select Cancel. The tool stops and the client offers no file.
What happens in MCP
Form elicitation lets an MCP tool ask the user for structured input. Here the browser calls export_stock. The local server returns input_required with an elicitation/create request that lists the two supported separators.
The client shows those choices and sends a second call with your answer. If you choose a separator, it sends accept and the selected value. The server returns CSV text, and the browser makes the downloadable file. If you cancel, the client sends cancel without a separator and the server returns a stop message.
The exchange shown in Stock Desk comes from the MCP calls made by the demo. See the MCP form elicitation specification for the message format.