← Back to list

mcp-tools
by Jawad-Chaudhary
The Evolution of Todo: A spec-driven, AI-native journey from a Python CLI to a Cloud-Native, Event-Driven AI Chatbot deployed on Kubernetes. Built with Claude Code, Spec-Kit Plus, Next.js, FastAPI, and Dapr.
⭐ 0🍴 0📅 Jan 22, 2026
SKILL.md
name: mcp-tools description: Create MCP server tools with Official Python MCP SDK for AI agents. Use when building MCP tools, registering tool schemas, or creating AI-accessible functions.
MCP Tools Development (Official SDK)
Tool Registration
from mcp.server import Server
from mcp.types import Tool, TextContent
import mcp.server.stdio
server = Server("mcp-server")
@server.list_tools()
async def list_tools() -> list[Tool]:
return [
Tool(
name="tool_name",
description="What this tool does",
inputSchema={
"type": "object",
"properties": {
"user_id": {"type": "string"},
"param": {"type": "string", "maxLength": 200}
},
"required": ["user_id", "param"]
}
)
]
@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
if name == "tool_name":
# Validate inputs
if not arguments.get("user_id"):
return [TextContent(type="text", text='{"error": "user_id required"}')]
# Stateless: create DB session per call
async with get_db_session() as session:
# Do work
result = {"status": "success", "data": {}}
return [TextContent(type="text", text=json.dumps(result))]
Server Startup
async def main():
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
await server.run(read_stream, write_stream, server.create_initialization_options())
if __name__ == "__main__":
import asyncio
asyncio.run(main())
Key Rules
- Stateless tools (no global state)
- DB session per tool call
- Return exact JSON schemas
- Input validation before operations
- User isolation (filter by user_id)
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon