/jezweb:mcp-cli-scriptsfrom jezweb
Build MCP servers in Python with FastMCP. Workflow: define tools and resources, build server, test locally, deploy to FastMCP Cloud or Docker. Use when creating MCP servers, exposing tools/resources/prompts to LLMs, building Claude integrations, or troubleshooting FastMCP module-level server, storage, lifespan, middleware, OAuth, or deployment errors.
Ships in jezweb. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build a working MCP server from a description of the tools you need. Produces a deployable Python server using FastMCP.
Ask what the server needs to provide:
A brief like "MCP server for querying our customer database" is enough.
pip install fastmcp
Copy and customise assets/basic-server.py:
from fastmcp import FastMCP
# MUST be at module level for FastMCP Cloud
mcp = FastMCP("My Server")
@mcp.tool()
async def search_customers(query: str) -> str:
"""Search customers by name or email."""
# Implementation here
return f"Found customers matching: {query}"
@mcp.resource("customers://{customer_id}")
async def get_customer(customer_id: str) -> str:
"""Get customer details by ID."""
return f"Customer {customer_id} details"
if __name__ == "__main__":
mcp.run()
For Claude Code terminal use, add scripts alongside the MCP server:
my-mcp-server/
├── src/index.ts # MCP server (for Claude.ai)
├── scripts/
│ ├── search.ts # CLI version of search tool
│ └── _shared.ts # Shared auth/config
├── SCRIPTS.md # Documents available scripts
└── package.json
CLI scripts provide file I/O, batch processing, and richer output that MCP can't.
See assets/SCRIPTS-TEMPLATE.md and assets/script-template.ts for TypeScript templates.
# Run server directly
python server.py
# With FastMCP dev mode (auto-reload)
fastmcp dev server.py
# HTTP mode for remote clients
python server.py --transport http --port 8000
# Test with MCP Inspector
fastmcp dev server.py --with-editable .
For comprehensive automated testing, generate a test script using the FastMCP Client. See references/testing-pattern.md for the async test pattern.
FastMCP Cloud (simplest):
Before deploying, work through the pre-deploy checklist in references/deploy-checklist.md to catch common issues (missing module-level server, hardcoded secrets, etc.).
fastmcp deploy server.py --name my-server
Docker (self-hosted):
See references/cloud-deployment.md for Dockerfile patterns.
Cloudflare Workers (edge): See the cloudflare-worker-builder skill for Workers-based MCP servers.
FastMCP Cloud requires the server instance at module level:
# CORRECT
mcp = FastMCP("My Server")
@mcp.tool()
def my_tool(): ...
# WRONG — Cloud can't find the server
def create_server():
mcp = FastMCP("My Server")
return mcp
FastMCP uses type annotations to generate tool schemas:
@mcp.tool()
async def search(
query: str, # Required parameter
limit: int = 10, # Optional with default
tags: list[str] = [] # Complex types supported
) -> str:
"""Docstring becomes the tool description."""
...
Return errors as strings, don't raise exceptions:
@mcp.tool()
async def get_data(id: str) -> str:
try:
result = await fetch_data(id)
return json.dumps(result)
except NotFoundError:
return f"Error: No data found for ID {id}"
assets/basic-server.py — Minimal FastMCP server templateassets/self-contained-server.py — Server with storage and middlewareassets/tools-examples.py — Tool patterns and type annotationsassets/resources-examples.py — Resource URI patternsassets/prompts-examples.py — Prompt template patternsassets/client-example.py — MCP client usageassets/SCRIPTS-TEMPLATE.md — CLI companion docs templateassets/script-template.ts — TypeScript CLI script templatereferences/common-errors.md — 30+ documented errors with fixesreferences/cli-commands.md — FastMCP CLI referencereferences/cloud-deployment.md — Deployment patterns (Cloud, Docker, Workers)references/production-patterns.md — Auth, middleware, storage backendsreferences/integration-patterns.md — FastAPI mount, OpenAPI importreferences/context-features.md — Lifespan, dependency injectionreferences/testing-pattern.md — FastMCP Client async test patternreferences/deploy-checklist.md — Pre-deploy validation checklistassets/SCRIPTS-TEMPLATE.md (opens in a new tab)assets/api-client-pattern.py (opens in a new tab)assets/basic-server.py (opens in a new tab)assets/client-example.py (opens in a new tab)assets/error-handling.py (opens in a new tab)assets/openapi-integration.py (opens in a new tab)assets/prompts-examples.py (opens in a new tab)assets/pyproject.toml (opens in a new tab)assets/requirements.txt (opens in a new tab)assets/resources-examples.py (opens in a new tab)assets/script-template.ts (opens in a new tab)assets/self-contained-server.py (opens in a new tab)assets/tools-examples.py (opens in a new tab)references/cli-commands.md (opens in a new tab)references/cloud-deployment.md (opens in a new tab)references/common-errors.md (opens in a new tab)references/context-features.md (opens in a new tab)references/deploy-checklist.md (opens in a new tab)references/integration-patterns.md (opens in a new tab)references/production-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
100 skills in this plugin
/accessibilityAudit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible"./agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./ai-sdk-coretailwind-theme-builderSet up Tailwind v4 with shadcn/ui themed UI. Workflow: install dependencies, configure CSS variables with @theme inline, set up dark mode, verify. Use when initialising React projects with Tailwind v4, setting up shadcn/ui theming, or fixing colors not working, tw-animate-css errors, @theme inline dark mode conflicts, @apply breaking, v3 migration issues.
/ai-sdk-uitailwind-theme-builderSet up Tailwind v4 with shadcn/ui themed UI. Workflow: install dependencies, configure CSS variables with @theme inline, set up dark mode, verify. Use when initialising React projects with Tailwind v4, setting up shadcn/ui theming, or fixing colors not working, tw-animate-css errors, @theme inline dark mode conflicts, @apply breaking, v3 migration issues.
/aussie-business-englishAustralian business English writing style for professional communications. Warm, direct, EN-AU spelling. Use when writing emails, chat messages, proposals, client communications, or any business writing for Australian SME audiences. Applies to drafting, editing, and tone-checking any professional text.
/better-authProvides Better Auth authentication integration patterns for NestJS backend and Next.js frontend with Drizzle ORM and PostgreSQL. Use when implementing authentication - Setting up Better Auth with NestJS backend, Integrating Next.js App Router frontend, Configuring Drizzle ORM schema with PostgreSQL, Implementing social login (GitHub, Google, etc.), Adding plugins (2FA, Organization, SSO, Magic Link, Passkey), Email/password authentication with session management, Creating protected routes and middlewarenpx claudepluginhub ulpi-io/plugin-marketplace --plugin jezweb