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.py — BaseTool 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

Metadata

Release files for pymcpx 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymcpx 0.2.0
File Size Uploaded Provenance Actions
pymcpx-0.2.0.tar.gz 112.3 kB With provenance Details for pymcpx-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymcpx 0.2.0
File Interpreter ABI Platform Actions
pymcpx-0.2.0-py3-none-any.whl Python 3 none any Details for pymcpx-0.2.0-py3-none-any.whl

Total release size: 257.8 kB

Release files / pymcpx-0.2.0.tar.gz

Download URL pymcpx-0.2.0.tar.gz
Size 112.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d53b88d0e129a9b264df318e380d26dc22fb6554482ffaeff1f98827419f0603
BLAKE2b-256 checksum
How to use checksums
e7d6facdb0adbe7565a419bd43172207e6015e5f5f90e6cd2642c4d6a3d7e915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

Release files / pymcpx-0.2.0-py3-none-any.whl

Download URL pymcpx-0.2.0-py3-none-any.whl
Size 145.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1372d7cf7b9ac511c2d49ecd8b402e62da1686b3801df8579652135d0b1f5bb7
BLAKE2b-256 checksum
How to use checksums
28c1c1ae9d9aca8eba5d22820db6ffe8df9c3fe1fb741581996f050509fcc200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

Security for pymcpx 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pymcpx-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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