Provide implementations of advanced data structures
日本語の概要は準備中です。原文の説明を表示しています。
Bootstrap MCP server with Python SDK, transport configuration, tool/resource handlers, and proper project structure.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Bootstrap a complete MCP server using the Python SDK with proper project structure.
Invoke this skill when you need to:
| 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) |
{
"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": "." }
}
}
]
}
<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
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())
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)
)
]
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}")
[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"
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Provide implementations of advanced data structures
日本語の概要は準備中です。原文の説明を表示しています。
Fresh adversarial code review with binary PASS/FAIL verdicts, evidence citations, and anchoring bias prevention via fresh reviewer spawning.
日本語の概要は準備中です。原文の説明を表示しています。
WASM-based instant code transforms for simple tasks, achieving 352x speedup over LLM inference with zero cost.
日本語の概要は準備中です。原文の説明を表示しています。
Coordinate Crew (persistent) and Polecat (transient) agents using Gas Town's hook-based work distribution and GUPP principle.
日本語の概要は準備中です。原文の説明を表示しています。
Generate visual representations of algorithm execution
日本語の概要は準備中です。原文の説明を表示しています。
Hierarchical coordination and drift detection with frequent checkpoints, shared memory coherence validation, role specialization enforcement, and short task cycles.
日本語の概要は準備中です。原文の説明を表示しています。