Skip to main content

A simple MCP server demonstration for Model Context Protocol

Project description

pypi-mcp-test

A simple MCP (Model Context Protocol) server demonstration package.

Installation

uv add pypi-mcp-test

Or install directly from the source:

uv add git+https://github.com/username/pypi-mcp-test.git

Usage

Run as a standalone server

uv run mcp install -m pypi_mcp

Or run directly:

uv run -m pypi_mcp

Use with MCP Inspector

npx @modelcontextprotocol/inspector uvx pypi-mcp-test

Configure in Claude Desktop, Cursor or Windsurf

Add this to your MCP configuration:

{
  "mcpServers": {
    "Demo": {
      "command": "uvx",
      "args": [
        "pypi-mcp-test"
      ]
    }
  }
}

The nice thing about this approach is that uvx will install dependencies into a temporary directory, so you don't need to first install and then figure out the path of that environment.

Features

This simple MCP server provides:

  1. An add tool that adds two numbers
  2. A greeting resource that returns a personalized greeting

Example Tool Usage

  • Adding numbers: Call the add tool with parameters a and b
  • Getting a greeting: Access the resource at greeting://{name}

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/username/pypi-mcp-test.git
cd pypi-mcp-test

# Set up a virtual environment
uv init
uv add mcp[cli]

# Run the server locally
uv run -m pypi_mcp

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

pypi_mcp_test-0.1.0.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

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

pypi_mcp_test-0.1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypi_mcp_test-0.1.0.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for pypi_mcp_test-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f40a58707a31acb9ed792fb49f78a05fcda5e19bb0f7604460041c14590b23e5
MD5 1983ba445bb0413defdceaf399a51181
BLAKE2b-256 dc01ddb583dd75b1589a34b40f0bb0968c67e696595168befb2ae6f84dd7ab2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypi_mcp_test-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for pypi_mcp_test-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 411d6f96aac43b895d3699a58c54bdd80aa3f69828ba24e439d25a8ada8f2a12
MD5 8bdc31cbb7f5b53a44f3721ad2c9f2a6
BLAKE2b-256 268a61108f47ef3693102970b955729bbadfa3632f48a9a612eb0ab295543aae

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