
sammorrowdrums/mcp-python-starter
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Python のスターター MCP サーバー.
概要
FastMCP を使用した Python のモデルコンテクストプロトコル (MCP) サーバテンプレート このスターターは、すべての主要なMCP機能をクリーンで、Pythonのコードで実証します。 - Python 3.11 + - uv (推奨) または pip このプロジェクトには、シームレスな開発のためのVSコード構成が含まれています。 1. VSコード2でプロジェクトを開きます。 MCP の設定は .vscode/mcp.json にあります。 3. VSコードのMCPツールを使用してサーバーをテストする 1. Dev Containers 拡張機能 2 をインストールします。コマンドパレットを開く: "Dev Containers: Reopen in Container" 3。 すべてが事前設定され、使用準備が整っています! uv run で実行すると、Python スクリプトが自動的にリロードされます。 デバッグ機能を強化するには、MCP のインスペクタ UI を提供する mcp dev を使用します。 MCPインスペクタは、MCPサーバーのテストとデバッグのための重要な開発ツールです.
概要(AI 翻訳)
FastMCP を使用した Python のモデルコンテクストプロトコル (MCP) サーバテンプレート このスターターは、すべての主要なMCP機能をクリーンで、Pythonのコードで実証します。
ドキュメント
- モデルコンテキストプロトコル
- Python SDKの
- FastMCPガイド
✨ 機能
| カテゴリー | 特集 | 特集 | 概要 |
お問い合わせ
| ※ツール** | [[T0] | アノテーションの基本的なツール |
|【get_weather | 工具戻り構造データ |
|【[T2] | LLMサンプリングを呼び起こすツール |
|【long_task | 5秒の進捗状況更新ツール |
|【load_bonus_tool | 動的に新しいツールをロード |
|リソース | [[T5] | 静的情報リソース |
| [file://example.md | ファイルベースのマークダウンリソース |
|** | [[T7] | パーソナライズされた挨拶 |
|【[T8] | IDによるデータ検索 |
| プロフィール | 〔[T9] | 様々なスタイルでご挨拶 |
| 【[T10] | フォーカスエリアでのコードレビュー |
すぐにスタート
前提条件
- Python 3.11 +
- uv(推奨)またはピップ
インストール
サーバーの実行
stdioの交通機関 (ローカル開発のために):
HTTPトランスポート(リモート/ウェブ展開の場合):
384 VS コードの統合
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Python Starter
A feature-complete Model Context Protocol (MCP) server template in Python using the official MCP Python SDK. This starter demonstrates core MCP features with clean, Pythonic code.
📚 Documentation
✨ Features
| Category | Feature | Description |
|---|---|---|
| Tools | hello |
Basic tool with annotations |
get_weather |
Tool returning structured data | |
ask_llm |
Tool that invokes LLM sampling | |
long_task |
Tool with 5-second progress updates | |
load_bonus_tool |
Dynamically loads a new tool | |
| Resources | info://about |
Static informational resource |
file://example.md |
File-based markdown resource | |
| Templates | greeting://{name} |
Personalized greeting |
data://items/{id} |
Data lookup by ID | |
| Prompts | greet |
Greeting in various styles |
code_review |
Code review with focus areas |
🚀 Quick Start
Prerequisites
- Python 3.11+
- uv (recommended) or pip
Installation
# Clone the repository
git clone https://github.com/SamMorrowDrums/mcp-python-starter.git
cd mcp-python-starter
# Install with uv (recommended)
uv sync
# Or with pip
pip install -e .
Running the Server
stdio transport (for local development):
uv run mcp-python-starter --stdio
HTTP transport (for remote/web deployment):
uv run mcp-python-starter --http --port 3000
🔧 VS Code Integration
This project includes VS Code configuration for seamless development:
- Open the project in VS Code
- The MCP configuration is in
.vscode/mcp.json - Test the server using VS Code’s MCP tools
Using DevContainers
- Install the Dev Containers extension
- Open command palette: “Dev Containers: Reopen in Container”
- Everything is pre-configured and ready to use!
📁 Project Structure
.
├── mcp_starter/
│ ├── __init__.py
インストール
npx @modelcontextprotocol/inspector -- uv run mcp-python-starter