Skip to guide

MCP elicitation for CSV export

Run the Stock Desk demo on your computer. Export a sample café stock list and see how a Model Context Protocol (MCP) tool asks which separator your spreadsheet needs.

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?

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.