alonf/mcppythondemo/python-mcp-tool-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-tool-bridgeSKILL.md
Python MCP Tool Bridge Skill
Use When
You need a Python lecture/demo client that lets an LLM call MCP tools without waiting for server-side sampling support.
Pattern
- Start the MCP server locally with
StdioServerParameters(command=sys.executable, args=["-m", server_module]). - Connect with
stdio_client(...)+ClientSession, theninitialize()andlist_tools(). - Convert each MCP
Toolinto an OpenAI function tool by reusingname,description, andinputSchema. - Run a chat-completions loop:
- send system + user messages plus tool schema
- if the model returns tool calls, execute them through
session.call_tool(...) - feed serialized tool results back as
role="tool" - stop when the model returns plain assistant text
- Keep config explicit via env vars for endpoint, API key, deployment, and API version.
Runtime Shape Check
- Before adding Azure AI Foundry project/runtime abstractions, inspect the live reference client code that actually runs the lecture flow.
- If that runnable path uses
AzureOpenAIClient(endpoint, credential).GetChatClient(deploymentName)or the equivalent endpoint + deployment + credential shape, keep the Python bridge on the simpler Azure OpenAI runtime path. - Only switch the Python client to a Foundry project client when the reference app itself is using a project endpoint/client in its active runnable path.
Testing Pattern
- For live validation in WSL, first verify
az account showsucceeds, then runpython3 -m mcp_linux_diag_server.client --json --prompt "..."; the[tool] ...trace plus final JSON answer is the fastest proof that Azure OpenAI and the MCP bridge both worked. - Unit-test config parsing independently.
- Unit-test MCP-tool → OpenAI-tool translation as a pure function.
- Unit-test the agent loop with a fake model and fake MCP session so no external credentials are required.
- Keep smoke tests focused on server startup plus client configuration guardrails.
Reference Files
src/mcp_linux_diag_server/client.pytests/test_client.pyscripts/smoke_test.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
- SKILL.md in the repositoryChecking.squad/skills/python-mcp-tool-bridge/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-tool-bridge)