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-elicitation

SKILL.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

  1. Server tool
  • Accept Context in 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.
  1. Selection step
  • Build a single top-level field with oneOf options:
  • 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.
  1. Confirmation step
  • Always require a typed phrase for destructive actions.
  • Validate exact phrase match server-side, but compare case-insensitively for usability.
  1. Lecture/demo client
  • Pass elicitation_callback= to ClientSession(...) only when local interaction is actually possible (stdin/stdout are TTYs).
  • In the callback, support:
  • single-field oneOf/enum selection forms
  • single-field text prompts
  • Return ElicitResult(action="cancel") on blank input so the server can treat it as a safe cancel.
  1. Linux process termination
  • Prefer SIGTERM first, then SIGKILL after a short timeout.
  • Treat zombie processes as exited in /proc/<pid>/stat to avoid hanging on child processes owned by another parent.

Reference Files

  • src/mcp_linux_diag_server/tools/processes.py
  • src/mcp_linux_diag_server/server.py
  • src/mcp_linux_diag_server/client.py
  • tests/test_processes.py
  • tests/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 / enum path options when present
  • True for 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/alonf/mcppythondemo/python-mcp-elicitation/badge)](https://verified-skill.com/skills/alonf/mcppythondemo/python-mcp-elicitation)

Something wrong with this skill or its page? Tell us.