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.1.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.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypi_mcp_test-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 183b14fd17a10b6d347da7346e173a81c59db2b4b86314dc7f3212593ddb243e
MD5 a059ee1c279c777618a31e0d02d19a89
BLAKE2b-256 4df41b1e9802973f949b288236f4f8cca4e7767f5235abbd794c88a9d1b1fc5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypi_mcp_test-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59e2dca5b4fa5edf492f551f339c3d1f80a848f42c5b0f5d33e1c9d42f6c586a
MD5 bc2aba64e00a9e1b1bb761d2deaaf247
BLAKE2b-256 b19a2fdf6461c7f9fec1acfcb7698d6d4b84134d5b5026728941cb59660526f7

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