MC

Guidelines for writing, testing, and formatting internal MCP scripts.

Install

mkdir -p .claude/skills/mcp-scripts && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1560" && unzip -o skill.zip -d .claude/skills/mcp-scripts && rm skill.zip

Installs to .claude/skills/mcp-scripts

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

MCP Script Rules
16 charsno explicit “when” trigger
Beginner

Key capabilities

  • Enforce CLI argument parsing using argparse
  • Standardize tool naming with double underscores
  • Implement runtime error handling
  • Execute script tests via harness

How it works

The skill mandates a specific structure for scripts in the scripts/ directory, requiring CLI argument parsing and the use of a runtime harness for testing.

Inputs & outputs

You give it
Python script in scripts/ directory
You get back
Tool execution results printed to stdout

When to use mcp-scripts

  • Standardize internal script development
  • Format MCP tool output
  • Implement argparse in scripts
  • Run script tests via harness

About this skill

MCP Script Rules

When working with files in scripts/:

DO

  • Use CLI arguments for all parameters (argparse)
  • Include USAGE docstring at top of file
  • Use call_mcp_tool("server__tool", params) pattern
  • Handle errors gracefully with informative messages
  • Print results to stdout for Claude to process

DON'T

  • Hardcode parameters in the script
  • Edit scripts to change parameters (use CLI args instead)
  • Import from servers/ directly (use runtime.mcp_client)

Tool Naming

Tool IDs use double underscore: serverName__toolName

Examples:

  • morph__warpgrep_codebase_search
  • ast-grep__ast_grep
  • perplexity__perplexity_ask

Testing

Test with: uv run python -m runtime.harness scripts/<script>.py --help

When not to use it

  • Hardcoding parameters in scripts
  • Importing directly from servers directory

Prerequisites

Scripts located in scripts/ directory

Limitations

  • Requires scripts to be placed in the scripts/ directory

How it compares

It replaces ad-hoc script development with a strict convention for tool naming and parameter handling.

Compared to similar skills

mcp-scripts side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
mcp-scripts (this skill)47moNo flagsBeginner
openspec-onboard106moReviewBeginner
workflow-orchestration-patterns102moNo flagsAdvanced
meta-automation-architect78moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry