Skip to main content

PyMCPX

MCP-compatible LangChain tools for AI agents — calculator, datetime, converter, and more.

Python License: MIT Pypi: Pymcpx


Features

  • 🔌 MCP-compatible — every tool exposes a stable name and JSON schema consumable by any MCP host
  • 🦜 LangChain-native — each tool extends BaseTool with typed args_schema
  • 🧱 Pydantic v2 — validated inputs and outputs
  • 🧪 Simulation engine — run agent workflows offline without any API keys
  • 📦 Service extras — install only what you need: pip install pymcpx[calculator]

Installation

# Core package (no service dependencies)
pip install pymcpx

# Specific service
pip install pymcpx[calculator]
pip install pymcpx[datetime]
pip install pymcpx[converter]

# All services
pip install pymcpx[all]

# Development
pip install pymcpx[dev]

Services

For full details on the tools, schemas, and offline simulation engines of each service, refer to their respective service-level README.md files:

Service Auth Status Install Extra Documentation
Aviationstack API Key ✅ Ready pymcpx[aviationstack] README
Calculator None ✅ Ready pymcpx[calculator] README
Cataas None ✅ Ready pymcpx[cataas] README
Catfacts None ✅ Ready pymcpx[catfacts] README
Converter None ✅ Ready pymcpx[converter] README
Datetime None ✅ Ready pymcpx[datetime] README
Dogapi None ✅ Ready pymcpx[dogapi] README
Ebird API Key ✅ Ready pymcpx[ebird] README
ExchangeRate.host API Key ✅ Ready pymcpx[exchangeratehost] README
Fixer API Key ✅ Ready pymcpx[fixer] README
IPstack API Key ✅ Ready pymcpx[ipstack] README
Marketstack API Key ✅ Ready pymcpx[marketstack] README
Numverify API Key ✅ Ready pymcpx[numverify] README
Screenshotlayer API Key ✅ Ready pymcpx[screenshotlayer] README
Weatherstack API Key ✅ Ready pymcpx[weatherstack] README
Zenserp API Key ✅ Ready pymcpx[zenserp] README

Contributing

Getting Started

git clone https://github.com/your-org/pymcpx.git
cd pymcpx
pip install -e ".[dev]"

Workflow

  1. Create a branch: git checkout -b feat/my-feature
  2. Make changes following the coding conventions
  3. Add / update tests
  4. Run tests: pytest
  5. Submit a Pull Request

Adding a New Service

Create a new directory under pymcpx/services/<name>/ following the layout of pymcpx/services/ipstack/:

  • SimulationEngine/models.py — Pydantic input models
  • SimulationEngine/utils.py — business logic, API clients
  • tools.pyBaseTool subclasses + MCP_TOOLS list
  • SimulationEngine/engine.py — offline simulation engine
  • tests/test_<name>.py — unit tests with respx mocks
  • README.md — service documentation including:
    • Prerequisites (API key setup)
    • Installation command
    • Tools table with names, classes, descriptions, and input keys
    • Usage examples (individual tools, toolkit, MCP integration)

Then add a re-export shim at pymcpx/<name>.py, register the optional dependency in pyproject.toml, and add the service row to the README Services table.

Pull Request Requirements

  • All tests pass
  • No new ruff warnings
  • New services include all required files (see above)

Continuous Integration

CI (.github/workflows/tests.yml) runs automatically on every push and pull request across Python 3.11 and 3.12 with coverage reporting.

Special Thanks

Special thanks to the Public APIs repository, a manually curated list of public APIs from many domains, which serves as a treasure trove of APIs and inspired our external service integrations.

License

MIT © PyMCPX Contributors

Download files

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

Source Distribution

pymcpx-0.2.0.tar.gz (112.3 kB view details)

Uploaded Source

Built Distribution

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

pymcpx-0.2.0-py3-none-any.whl (145.5 kB view details)

Uploaded Python 3

File details

Details for the file pymcpx-0.2.0.tar.gz.

File metadata

  • Download URL: pymcpx-0.2.0.tar.gz
  • Upload date:
  • Size: 112.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pymcpx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d53b88d0e129a9b264df318e380d26dc22fb6554482ffaeff1f98827419f0603
MD5 f8954482c417f035946aee7487d08533
BLAKE2b-256 e7d6facdb0adbe7565a419bd43172207e6015e5f5f90e6cd2642c4d6a3d7e915

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymcpx-0.2.0.tar.gz:

Publisher: python-publish.yml on mohitprajapat2001/pymcpx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymcpx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pymcpx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 145.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pymcpx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1372d7cf7b9ac511c2d49ecd8b402e62da1686b3801df8579652135d0b1f5bb7
MD5 9326146f0fd08ac8186512e1922167fc
BLAKE2b-256 28c1c1ae9d9aca8eba5d22820db6ffe8df9c3fe1fb741581996f050509fcc200

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymcpx-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on mohitprajapat2001/pymcpx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page