MCP-compatible LangChain tools for AI agents — calculator, datetime, converter, and more.
Project description
PyMCPX
MCP-compatible LangChain tools for AI agents — calculator, datetime, converter, and more.
Features
- 🔌 MCP-compatible — every tool exposes a stable name and JSON schema consumable by any MCP host
- 🦜 LangChain-native — each tool extends
BaseToolwith typedargs_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 | Status | Install Extra | Documentation |
|---|---|---|---|
| Calculator | ✅ Ready | pymcpx[calculator] |
README |
| Converter | ✅ Ready | pymcpx[converter] |
README |
| Datetime | ✅ Ready | pymcpx[datetime] |
README |
| IPstack | ✅ Ready | pymcpx[ipstack] |
README |
| Marketstack | ✅ Ready | pymcpx[marketstack] |
README |
| Weatherstack | ✅ Ready | pymcpx[weatherstack] |
README |
| Numverify | ✅ Ready | pymcpx[numverify] |
README |
| Fixer | ✅ Ready | pymcpx[fixer] |
README |
| Aviationstack | ✅ Ready | pymcpx[aviationstack] |
README |
| Zenserp | ✅ Ready | pymcpx[zenserp] |
README |
| Screenshotlayer | ✅ Ready | pymcpx[screenshotlayer] |
README |
| ExchangeRate.host | ✅ Ready | pymcpx[exchangeratehost] |
README |
Contributing
Getting Started
git clone https://github.com/your-org/pymcpx.git
cd pymcpx
pip install -e ".[dev]"
Workflow
- Create a branch:
git checkout -b feat/my-feature - Make changes following the coding conventions
- Add / update tests
- Run tests:
pytest - 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 modelsSimulationEngine/utils.py— business logic, API clientstools.py—BaseToolsubclasses +MCP_TOOLSlistSimulationEngine/engine.py— offline simulation enginetests/test_<name>.py— unit tests withrespxmocksREADME.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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymcpx-0.1.0.tar.gz.
File metadata
- Download URL: pymcpx-0.1.0.tar.gz
- Upload date:
- Size: 93.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7df2e016a9ea6a24ae384b71200918fe3af03fe4fcf7e0c71fc588b7cd7394bb
|
|
| MD5 |
d8c484d3b1c1b216d04d714eb7780a08
|
|
| BLAKE2b-256 |
6a9c1581b867588f1682b3fef0ec5642a2053a39bc354905c18955176c292d20
|
Provenance
The following attestation bundles were made for pymcpx-0.1.0.tar.gz:
Publisher:
python-publish.yml on mohitprajapat2001/pymcpx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymcpx-0.1.0.tar.gz -
Subject digest:
7df2e016a9ea6a24ae384b71200918fe3af03fe4fcf7e0c71fc588b7cd7394bb - Sigstore transparency entry: 1957443076
- Sigstore integration time:
-
Permalink:
mohitprajapat2001/pymcpx@5d9420a3b984fbbee5091c2c54d9033f17034d1b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mohitprajapat2001
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5d9420a3b984fbbee5091c2c54d9033f17034d1b -
Trigger Event:
release
-
Statement type:
File details
Details for the file pymcpx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pymcpx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 111.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9900102baa074c2b52fc4d9d29a5c0bdb374a751de2fa322624e7f04da6c843f
|
|
| MD5 |
2c5a784a62d9eecd4722d20caca9fc59
|
|
| BLAKE2b-256 |
4f20b07de44f95059dc9cbd959f91a6dda0ef2a4698fd726f1174e524389e1c6
|
Provenance
The following attestation bundles were made for pymcpx-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on mohitprajapat2001/pymcpx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymcpx-0.1.0-py3-none-any.whl -
Subject digest:
9900102baa074c2b52fc4d9d29a5c0bdb374a751de2fa322624e7f04da6c843f - Sigstore transparency entry: 1957443398
- Sigstore integration time:
-
Permalink:
mohitprajapat2001/pymcpx@5d9420a3b984fbbee5091c2c54d9033f17034d1b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mohitprajapat2001
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5d9420a3b984fbbee5091c2c54d9033f17034d1b -
Trigger Event:
release
-
Statement type: