alonf/mcppythondemo/python-mcp-elicitation
Claude Code and agent skill by alonf/mcppythondemo
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install alonf/mcppythondemo/python-mcp-elicitationSKILL.md
Python MCP Elicitation Skill
Use When
You need a Python MCP server/client pair to support safe server-driven form elicitation, especially for risky actions like process termination.
Pattern
- Server tool
- Accept
Contextin the tool signature. - Check client capability with
ctx.request_context.session.check_client_capability(...). - If dynamic form options are needed, call
ctx.request_context.session.elicit_form(...)with a hand-built restricted JSON schema instead of relying on static Pydantic models.
- Selection step
- Build a single top-level field with
oneOfoptions: const: machine-readable value (PID, identifier, etc.)title: human-readable label for the client UI- Keep the form flat; MCP elicitation schemas are intentionally simple.
- Confirmation step
- Always require a typed phrase for destructive actions.
- Validate exact phrase match server-side, but compare case-insensitively for usability.
- Lecture/demo client
- Pass
elicitation_callback=toClientSession(...)only when local interaction is actually possible (stdin/stdoutare TTYs). - In the callback, support:
- single-field
oneOf/enumselection forms - single-field text prompts
- Return
ElicitResult(action="cancel")on blank input so the server can treat it as a safe cancel.
- Linux process termination
- Prefer
SIGTERMfirst, thenSIGKILLafter a short timeout. - Treat zombie processes as exited in
/proc/<pid>/statto avoid hanging on child processes owned by another parent.
Reference Files
src/mcp_linux_diag_server/tools/processes.pysrc/mcp_linux_diag_server/server.pysrc/mcp_linux_diag_server/client.pytests/test_processes.pytests/test_m5_http.py
QA Pattern
- For integration tests, use a schema-driven callback that inspects the single elicited field and auto-fills:
- matching
oneOf/enumpath options when present Truefor boolean approvals- quoted confirmation phrases when the schema description demands exact text
- the requested path or a stable QA reason for free-text fields
- This keeps access/approval tests reusable even when the server changes the exact elicitation schema shape but preserves the single-field MCP form contract.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/skills/python-mcp-elicitation/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alonf/mcppythondemo/python-mcp-elicitation)