openvinotoolkit/model_server/python-mcp-sdk-skill
Claude Code and agent skill by openvinotoolkit/model_server
- community
Checking that the SKILL.md file is still in the repository.
Guidance for implementing Python MCP SDK stdio servers with FastMCP, robust validation, and deterministic tool output.
Install
npx vskill@latest install openvinotoolkit/model_server/python-mcp-sdk-skillSKILL.md
Python MCP SDK Server Builder
Use this skill when the user asks to create or modify an MCP server in Python.
Goal
Build a minimal, production-safe MCP stdio server using the Python MCP SDK package mcp.
Implementation pattern
- Create
mcp_server/<name>_mcp_server.py. - Use
FastMCP. - Register one or more
@mcp.tool()functions. - Add explicit docstrings and strict input validation.
- Start with
mcp.run(transport="stdio").
Required template
Tool annotations — MANDATORY
Every @mcp.tool() MUST declare MCP tool annotations. Annotations tell hosts (like dcode) whether a tool is safe to call without user approval. Tools with no annotations are treated as "possibly mutating" and are rejected outright in dcode headless mode (dcode -n ...) with:
"This MCP action requires approval, but the current headless runtime has no approval UI."
dcode's HeadlessMCPGuardMiddleware gates any tool whose metadata does not satisfy BOTH:
readOnlyHint is TruedestructiveHint is not True
Choose the annotation set that matches the tool's real behavior:
| Tool behavior | Annotations | |
|---|---|---|
| Pure read (clock, config lookup, HTTP GET) | readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False | |
| Read that consults an external service (web/API) | readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=True | |
| Idempotent write (set a value; same input twice = same result) | readOnlyHint=False, destructiveHint=False, idempotentHint=True, openWorldHint=<True/False> | |
| Destructive write (delete, drop, DROP TABLE, rm) | readOnlyHint=False, destructiveHint=True, idempotentHint=False, openWorldHint=<True/False> |
Never claim readOnlyHint=True for a tool that mutates state. Lying to skip the approval gate is a security issue.
For tools that are NOT read-only, users must run them from the interactive TUI (approval required); document that limitation in the tool's docstring.
Time tool recipe
When the user needs exact current time, expose:
get_current_utc_iso8601()returning UTC timestamp in ISO 8601 with trailing Z.- Optional timezone helper for named zones using
zoneinfo.
Both are pure reads → annotate with READ_ONLY (see template above).
Quality checks
- Avoid third-party dependencies beyond
mcp. - Do not use network calls unless required.
- Keep tool outputs deterministic and machine-readable.
- Every tool must have `ToolAnnotations` matching its real behavior — see the table above. Verify by running the tool from
dcode -nafter implementation; if it fails with the "approval, but the current headless runtime has no approval UI" message, the annotations are missing or wrong.
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 repositoryCheckingdemos/integration_with_deepagents_code/.deepagents/skills/python-mcp-sdk-skill/SKILL.md
Popularity
- 7-day trend score
- 0
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/openvinotoolkit/model_server/python-mcp-sdk-skill)