Skip to main content

A MCP server project

Project description

🌦️ weather_service MCP サーバー

🧩 コンポーネント

📚 リソース

このサーバーは、シンプルなノート保存システムを実装しています:

  • カスタム note:// URIスキームで個別のノートにアクセス
  • 各ノートリソースには、名前、説明、text/plainのマイムタイプがあります

💡 プロンプト

サーバーは単一のプロンプトを提供します:

  • summarize-notes:保存されている全てのノートの要約を作成
    • オプションの"style"引数で詳細レベルを制御(brief/detailed)
    • 全ての現在のノートとスタイル設定を組み合わせてプロンプトを生成

🛠️ ツール

サーバーは1つのツールを実装しています:

  • add-note:新しいノートをサーバーに追加
    • "name"と"content"を必須の文字列引数として受け取り
    • サーバーの状態を更新し、リソースの変更をクライアントに通知

🚀 クイックスタート

📥 インストール

Claude Desktop

MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windowsの場合: %APPDATA%/Claude/claude_desktop_config.json

開発/未公開サーバーの設定 ``` "mcpServers": { "weather_service": { "command": "uv", "args": [ "--directory", "C:\Prj\weather_service", "run", "weather_service" ] } } ```
公開サーバーの設定 ``` "mcpServers": { "weather_service": { "command": "uvx", "args": [ "weather_service" ] } } ```

👨‍💻 開発

🏗️ ビルドと公開

パッケージを配布用に準備するには:

  1. 依存関係を同期しロックファイルを更新:
uv sync
  1. パッケージのディストリビューションをビルド:
uv build

これにより、dist/ディレクトリにソースとホイールのディストリビューションが作成されます。

  1. PyPIに公開:
uv publish

注意:PyPIの認証情報は環境変数またはコマンドフラグで設定する必要があります:

  • トークン:--tokenまたはUV_PUBLISH_TOKEN
  • またはユーザー名/パスワード:--username/UV_PUBLISH_USERNAME--password/UV_PUBLISH_PASSWORD

🔍 デバッグ

MCPサーバーはstdioを介して実行されるため、デバッグが難しい場合があります。最適なデバッグ体験のために、MCP Inspectorの使用を強く推奨します。

npmを使用して、次のコマンドでMCP Inspectorを起動できます:

npx @modelcontextprotocol/inspector uv --directory C:\Prj\weather_service run weather-service

起動時、InspectorはブラウザでアクセスできるURLを表示し、デバッグを開始できます。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weather_service-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weather_service-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file weather_service-0.1.0.tar.gz.

File metadata

  • Download URL: weather_service-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for weather_service-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2fe1239b189437f6d7c8867a5f8f4b5af3be07d24453e4899a6ede098ff4f196
MD5 3afe4601ffc639de96adc5bdfb0e59d0
BLAKE2b-256 2d847b525c361ed6bd105ede1d971acfc2eed4ba9e023f7846f83922edd4d911

See more details on using hashes here.

File details

Details for the file weather_service-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for weather_service-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d416124ef1d236166139c34ca79dc72fd0c24338c8b56529e28889444e4e19a
MD5 b6b7f959818e45c757cde9ef338df0f3
BLAKE2b-256 ca61d1cba1e44fe30e84004b93791450c6a2331a15ba5e5213ba18977e839437

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page