mcp-sdk-python-bootstrapper
Bootstrap MCP server with Python SDK, transport configuration, tool/resource handlers, and proper project structure.
What this skill does
# MCP SDK Python Bootstrapper
Bootstrap a complete MCP server using the Python SDK with proper project structure.
## Capabilities
- Generate Python MCP server project structure
- Create tool and resource handlers
- Configure stdio/SSE transport layers
- Set up proper typing with Pydantic
- Implement error handling patterns
- Configure Poetry/pip project
## Usage
Invoke this skill when you need to:
- Bootstrap a new MCP server in Python
- Create tools and resources for AI consumption
- Set up MCP transport layer
- Implement MCP protocol handlers
## Inputs
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| projectName | string | Yes | Name of the MCP server project |
| description | string | Yes | Description of the server |
| tools | array | No | List of tools to implement |
| resources | array | No | List of resources to expose |
| transport | string | No | Transport type: stdio, sse (default: stdio) |
### Tool Structure
```json
{
"tools": [
{
"name": "search_files",
"description": "Search for files matching a pattern",
"parameters": {
"pattern": { "type": "string", "description": "Search pattern" },
"path": { "type": "string", "description": "Base path", "default": "." }
}
}
]
}
```
## Output Structure
```
<projectName>/
├── pyproject.toml
├── README.md
├── .gitignore
├── src/
│ └── <package>/
│ ├── __init__.py
│ ├── __main__.py # Entry point
│ ├── server.py # MCP server setup
│ ├── tools/
│ │ ├── __init__.py
│ │ └── search.py # Tool implementations
│ ├── resources/
│ │ ├── __init__.py
│ │ └── files.py # Resource providers
│ └── types/
│ ├── __init__.py
│ └── schemas.py # Pydantic models
└── tests/
└── test_tools.py
```
## Generated Code Patterns
### Server Setup (src/<package>/server.py)
```python
import asyncio
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, Resource
from .tools import register_tools
from .resources import register_resources
# Create server instance
server = Server("<projectName>")
# Register handlers
register_tools(server)
register_resources(server)
async def main():
"""Run the MCP server."""
async with stdio_server() as (read_stream, write_stream):
await server.run(
read_stream,
write_stream,
server.create_initialization_options()
)
def run():
"""Entry point for the server."""
asyncio.run(main())
```
### Tool Implementation (src/<package>/tools/search.py)
```python
from typing import Any
from pydantic import BaseModel, Field
from mcp.server import Server
from mcp.types import Tool, TextContent
class SearchFilesInput(BaseModel):
"""Input schema for search_files tool."""
pattern: str = Field(description="Search pattern (glob)")
path: str = Field(default=".", description="Base path to search")
def register(server: Server) -> None:
"""Register the search_files tool."""
@server.list_tools()
async def list_tools() -> list[Tool]:
return [
Tool(
name="search_files",
description="Search for files matching a pattern",
inputSchema=SearchFilesInput.model_json_schema()
)
]
@server.call_tool()
async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
if name != "search_files":
raise ValueError(f"Unknown tool: {name}")
# Validate input
input_data = SearchFilesInput(**arguments)
# Execute search
from pathlib import Path
matches = list(Path(input_data.path).glob(input_data.pattern))
return [
TextContent(
type="text",
text="\n".join(str(m) for m in matches)
)
]
```
### Resource Provider (src/<package>/resources/files.py)
```python
from mcp.server import Server
from mcp.types import Resource, TextResourceContents
def register(server: Server) -> None:
"""Register file resources."""
@server.list_resources()
async def list_resources() -> list[Resource]:
return [
Resource(
uri="file:///config",
name="Configuration",
description="Server configuration",
mimeType="application/json"
)
]
@server.read_resource()
async def read_resource(uri: str) -> TextResourceContents:
if uri == "file:///config":
return TextResourceContents(
uri=uri,
mimeType="application/json",
text='{"version": "1.0.0"}'
)
raise ValueError(f"Unknown resource: {uri}")
```
## Dependencies
```toml
[tool.poetry.dependencies]
python = ">=3.10"
mcp = "^1.0.0"
pydantic = "^2.0.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-asyncio = "^0.23.0"
```
## Workflow
1. **Create project structure** - Set up Python package
2. **Generate server** - MCP server with transport
3. **Create tools** - Tool handlers with schemas
4. **Create resources** - Resource providers
5. **Add types** - Pydantic models
6. **Set up tests** - Async test fixtures
## Target Processes
- mcp-server-bootstrap
- mcp-tool-implementation
- mcp-resource-provider
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.