Skip to main content

Add your description here

Project description

MCP Python Demo

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

Setup

If using Dev Container (Recommended)

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).
  2. Select the "refresh" button in the top right corner of the Copilot chat text field to refresh the server list.
  3. Select the "🛠️" button to see all the possible tools, including the ones from this repo.
  4. Put a question in the chat that would naturally invoke one of the tools, for example: "What is the current weather in Seattle?".

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

iflow_mcp_pamelafox_mcp_python_demo-0.1.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

  • Download URL: iflow_mcp_pamelafox_mcp_python_demo-0.1.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_pamelafox_mcp_python_demo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d6705bd0541c00a67df213ec60b5e6928e6679e5d6766a5d19a4bf11071397a
MD5 b940860ea58fc6dc2d7f87a0ff795e90
BLAKE2b-256 2cde34074e84b3756dc23d84ae94767017826a77171c56cf62101120c5227b5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iflow_mcp_pamelafox_mcp_python_demo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_pamelafox_mcp_python_demo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62b2160a85c1ef8dacc98f6b203e5bb7e72f678f855f25347ec0b56376afb5b9
MD5 04d586601ec1d5cb3ca951d4c6de0ee2
BLAKE2b-256 77df33842d451f7e45e8ff792aca6b8a8a9e6c9858af27dd2824e91ffbd26a55

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