In this video, you will see how Elicitation transforms a standard tool call into a secure, interactive workflow. You’ll run the SafeDB server and your custom client to witness the “Human-in-the-loop” process.
First, you need to start the database server. Open your terminal and run the server script.
uv run --with mcp db_server.py
Wait for the confirmation message Uvicorn running on http://127.0.0.1:8000. Your server is now active and ready to monitor for critical queries.
Now, open a second terminal window to run your custom client.
uv run --with mcp db_client.py
As the client runs, notice the first test: a safe SELECT query. Since this isn’t a destructive command, the server executes it immediately and returns the result without any intervention.
Now, watch what happens during the second test: the DROP TABLE query.
The client sends the dangerous command, but instead of finishing, the terminal pauses. You see a “CRITICAL WARNING” printed in the terminal. This is the Elicitation request being handled by your client’s callback function.
The script is now waiting for your manual input. First, specify the environment. Type development and press Enter.
Next, provide a justification for this destructive action. For this demo, type Database is corrupted and press Enter.
Finally, you must explicitly confirm the operation. Type yes and press Enter.
Once you provide these details, the client sends the data back to the server. The server resumes execution, validates your justification, and completes the query.
Look at the Final Result from Server. You can see that the query was executed successfully on the Development environment, logged with your specific reason.