my-mcp
MCP-Server
MCP-Serverは、FastMCPサーバーを中心に構築された小さなPythonワークスペースです。メインパッケージは my-mcp/ にあり、SQLiteからのローカル気象データとCoinGeckoからのライブ暗号資産ツールを組み合わせた DataTools というサーバーを公開しています。
含まれるもの
ローカルデータベースから気象データを照会し、平均を計算するためのMCPツール
CoinGeckoから暗号資産の価格やトップコインを取得するためのMCPツール
weather://latestにある動的なMCPリソースクライアントサイドのLLMワークフロー用の気象要約プロンプト
SQLAlchemyモデルとAlembicマイグレーションによるSQLite永続化
コンテナ内でサーバーを実行するためのDockerサポート
Related MCP server: Weather Service MCP Server
リポジトリ構成
.
├── Dockerfile
├── pyproject.toml
├── uv.lock
└── my-mcp/
├── alembic.ini
├── migrations/
├── data/
├── pyproject.toml
├── README.md
└── src/my_mcp/
├── server.py
└── db/要件
Python 3.14
セットアップ
ワークスペースのルートから依存関係をインストールします:
uv syncサーバーは利用可能な場合、.env から環境変数を使用します。最も重要なものは以下の通りです:
HOST- MCPサーバーのバインドアドレス(例:0.0.0.0)PORT- SSEポート(例:8080)DB_PATH- SQLiteデータベースへのパス(デフォルトはdata/app.db)
データベース
データベーススキーマはAlembicで管理され、SQLiteに保存されます。
パッケージディレクトリからマイグレーションを実行します:
cd my-mcp
uv run alembic upgrade headサンプルデータが必要な場合は、以下でデータベースをシードできます:
cd my-mcp
uv run python -m my_mcp.db.seedローカルでの実行
リポジトリのルートからサーバーを起動します:
uv run --package my-mcp my-mcpデフォルトでは、サーバーはSSE経由で実行され、HOST と PORT で定義されたホストとポートでリッスンします。
Docker
イメージをビルドします:
docker build -t mcp-server .実行します:
docker run --rm -p 8080:8080 -e HOST=0.0.0.0 -e PORT=8080 -e DB_PATH=data/app.db mcp-serverMCPツールとリソース
ツール
readings_for_city(city, hours=6)- 都市の最近の気象データを返しますaverage_temp(city, hours=6)- 都市の平均気温を返しますget_crypto_price(coin_id="bitcoin")- コインの価格、時価総額、24時間変動を返しますget_top_coins(limit=5)- 時価総額上位の暗号資産を返します
リソース
weather://latest- データベース内の最新の気象データを返します
プロンプト
weather_summary(city, hours=6)- クライアントまたはLLM用の簡潔な気象要約プロンプトを作成します
クライアント設定
SSEベースのクライアントの場合は、実行中のサーバーURLを指定します(例):
http://localhost:8080/sseClaude Desktopや同様のツールの場合は、このリポジトリから uv run --package my-mcp my-mcp を起動するコマンドベースの設定を使用してください。
注意事項
暗号資産ツールは公開されているCoinGecko APIを呼び出すため、インターネットアクセスが必要です。
データベースファイルが存在しない場合は自動的に作成されます。
Alembicは
my-mcp/alembic.ini内でsqlite:///./data/app.dbを使用するように既に設定されています。
This server cannot be deployed
Maintenance
Related MCP Connectors
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
MCP-native notes and memory for ChatGPT, Claude, and other AI tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server for managing and persisting notes, offering CRUD operations, note summarization, and resource-based access via a note:// URI scheme.47MIT
- FlicenseNot gradedqualityDmaintenanceA simple note-taking MCP server that allows storing and summarizing notes with custom URI schemes and provides functionality to add notes and generate summaries with different detail levels.5-
- FlicenseNot gradedqualityDmaintenanceA Claude-compatible MCP server that enables storing and summarizing notes through a simple note storage system with custom URI scheme.5-
- -licenseNot gradedqualityNot gradedmaintenanceA simple notes system that allows creating, storing, and accessing text notes through MCP resources and tools, with built-in prompt support for generating summaries of stored notes.-