alonf/mcppythondemo/python-mcp-sampling-bridge

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-sampling-bridge

SKILL.md

Python MCP Sampling Bridge

Use When

  • A Python MCP server needs sampling/createMessage parity with another implementation
  • The client should own the LLM runtime while the server orchestrates sampling

Pattern

  1. On the server, call ctx.session.create_message(...).
  2. On the client, pass an async sampling_callback into ClientSession(...); this automatically advertises sampling capability.
  3. Keep the callback thin: translate MCP messages to your model input, call the model, return CreateMessageResult.
  4. Treat sampled output as untrusted input. Validate it on the server, retry with validation errors when needed, and only then execute deterministic work.
  5. For Linux diagnostics teaching flows, a constrained PATH or PATH | grep FIELD format is easier to validate than free-form shell commands.

Repo Example

  • src/mcp_linux_diag_server/tools/linux_diagnostics.py
  • src/mcp_linux_diag_server/client.py
  • tests/test_linux_diagnostics.py

Security

  • Security scanPassed, 90 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-sampling-bridge/badge)](https://verified-skill.com/skills/alonf/mcppythondemo/python-mcp-sampling-bridge)

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