PM

pamelafox/mcp-python-demo

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

47 stars 16 forks 品質 64 トレンド 0MIT

pamelafox/mcp-python-demo は [https://github.com/pamelafox/mcp-python-demo.] からインポートされた MCP サーバーの候補です

概要

pamelafox/mcp-python-demo は [https://github.com/pamelafox/mcp-python-demo.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

このリポジトリは、Python用のモデルコンテキストプロトコル(MCP)SDKの使用を示しています。

セットアップ

Dev Container を使用した場合 (推奨)

dev コンテナ (Docker で VS コード) を使っているなら、すべて既に設定済みです! コンテナには、Python、uv、および必要なすべてのツールが含まれています。

ローカルで実行する場合

  1. 既にいていない場合の紫外線を取付けて下さい

  2. 仮想環境を作成します。

  3. 仮想環境を活動化させて下さい:

  • macOS/Linux で:

  • Windowsで:

  1. pyproject.toml から依存関係をインストールします。

開発インスペクタの実行

開発検査官を実行するには:

クロードにインストール

ClaudeにこのMCPプラグインをインストールするには:

  1. このコマンドを実行する:

  2. クロードを再起動する

  3. トラブルシューティング: エラーが発生した場合は、 config の uv パスを絶対パスに固定します。

次に、設定を絶対パスで更新します。

GitHub Copilot のインストール

あなたがビデオから学ぶことを好むならば、このビデオは、バーク・ホーランドまたはジェームズ・モンテマグノからこのビデオを見てください。

##Claudeデスクトップに既にインストールされている場合

`chat.mcp.discovery を有効にします.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Python Demo

This repository demonstrates the use of Model Context Protocol (MCP) SDK for Python.

Setup

If you’re using the dev container (VS Code with Docker), everything is already set up for you! The container includes Python, uv, and all necessary tools.

If running locally

  1. Install uv if you haven’t already

  2. Create a virtual environment:

    uv venv
    
  3. Activate the virtual environment:

    • On macOS/Linux:

      source .venv/bin/activate
      
    • On Windows:

      .venv\Scripts\activate
      
  4. Install dependencies from pyproject.toml:

    uv sync --dev
    

Running Development Inspector

To run the development inspector:

mcp dev server.py

Installing in Claude

To install this MCP plugin in Claude:

  1. Run this command:

    mcp install server.py
    
  2. Restart Claude

  3. Troubleshooting: If you get an error, fix the uv path in the config to an absolute path:

    which uv
    

    Then update the configuration with the absolute path.

Installing in GitHub Copilot

📺 If you prefer learning from videos, watch this video from Burke Holland or this video from James Montemagno.

If you already installed in Claude Desktop

Enable chat.mcp.discovery.enabled: true in your settings and VS Code will discover existing MCP server lists, and proceed to use the tool in GitHub Copilot Agent mode.

If you did not install in Claude Desktop

  • If you want to associate the MCP server only with a particular repo, create a .vscode/mcp.json file with this content:

    {
    "inputs": [
    ],
    "servers": {
          "pamelas-mcp": {
             "command": "PATH/TO/uv",
             "args": [
                "--directory",
                "/PATH/TO/mcp-python-demo",
                "run",
                "server.py"
             ]
          }
    }
    }
    
  • Alternatively, if you want to associate the MCP server with all repos, add to your VS Code User Settings JSON:

    {
    "mcp": {
       "inputs": [],
       "servers": {
          "pamelas-mcp": {
          "command": "/PATH/TO/uv",
          "args": [
             "--directory",
             "/PATH/TO/mcp-python-demo",
             "run",
             "server.py"
          ]
          }
       }
    }
    }
    

    Another way to update settings is to run this command in the terminal:

    code-insiders --add-mcp "{\"name\":\"pamelas-mcp\",\"command\":\"/PATH/TO/uv\",\"args\":[\"--directory\",\"/PATH/TO/mcp-python-demo\",\"run\",\"server.py\"]}"
    

Using tools in Copilot

  1. Now that the mcp server is discoverable, open GitHub Copilot and select the Agent mode (not Chat or Edits).
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →