Adapt MCP servers to many agentic framework.
Project description
MCPAdapt
Unlock 650+ MCP servers tools in your favorite agentic framework.
Installation Instructions
# with uv
uv add mcpadapt
# or with pip
pip install mcpadapt
Usage
MCPAdapt adapt any MCP servers into tools that you can use right in your agentic workflow:
with MCPAdapt(
# specify the command to run your favorite MCP server (support also smithery and co.)
StdioServerParameters(command="uv", args=["run", "src/echo.py"]),
# specify the adapter you want to use to adapt MCP into your tool in this case smolagents.
SmolAgentsAdapter(),
) as tools:
# enjoy your smolagents tools as if you wrote them yourself
...
MCP Adapt supports Smolagents, [Pydantic.dev, Langchain, Llammaindex and more...]*.
Contribute
If your favorite agentic framework is missing no problem add it yourself it's quite easy:
- create a new module in
src/mcpadapt/{name_of_your_framework}_adapter.py:
class YourFrameworkAdapter(ToolAdapter):
def adapt(
self,
func: Callable[[dict | None], mcp.types.CallToolResult],
mcp_tool: mcp.types.Tool,
) -> YourFramework.Tool:
# HERE implement how the adapter should convert a simple function and mcp_tool (JSON Schema)
# into your framework tool. see smolagents_adapter.py for an example
def async_adapt(
self,
afunc: Callable[[dict | None], Coroutine[Any, Any, mcp.types.CallToolResult]],
mcp_tool: mcp.types.Tool,
) -> YourFramework.Tool:
# if your framework supports async function even better use async_adapt.
- and that's it, test that your adapter is working and send us a PR to share it with the world.
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 mcpadapt-0.0.2.tar.gz.
File metadata
- Download URL: mcpadapt-0.0.2.tar.gz
- Upload date:
- Size: 61.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddff2c989e3c270d41349c08db6f156e6e8aed64c210e291b105d2a9a458af8
|
|
| MD5 |
3b6340263930cb23b61ebe29ba9b0d92
|
|
| BLAKE2b-256 |
25c4a8a4e88ca80cbc9aad0d385458dff3582c0e612a3de5abdf5e209a093064
|
Provenance
The following attestation bundles were made for mcpadapt-0.0.2.tar.gz:
Publisher:
release.yml on grll/mcpadapt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpadapt-0.0.2.tar.gz -
Subject digest:
eddff2c989e3c270d41349c08db6f156e6e8aed64c210e291b105d2a9a458af8 - Sigstore transparency entry: 161714741
- Sigstore integration time:
-
Permalink:
grll/mcpadapt@78f1775226a1a451cc3919e4f995153e20b571f9 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/grll
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@78f1775226a1a451cc3919e4f995153e20b571f9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcpadapt-0.0.2-py3-none-any.whl.
File metadata
- Download URL: mcpadapt-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f4db90263d25629ebedf192871be9118f0b8d3204c486eca8b8c6c21e033ddc
|
|
| MD5 |
e9e37980cb25e27adfa6ad160dc630c3
|
|
| BLAKE2b-256 |
5adcee2be5634656801c5b664531c54da4669f58e8ed3059d4cd97cbc0cd65e0
|
Provenance
The following attestation bundles were made for mcpadapt-0.0.2-py3-none-any.whl:
Publisher:
release.yml on grll/mcpadapt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpadapt-0.0.2-py3-none-any.whl -
Subject digest:
2f4db90263d25629ebedf192871be9118f0b8d3204c486eca8b8c6c21e033ddc - Sigstore transparency entry: 161714742
- Sigstore integration time:
-
Permalink:
grll/mcpadapt@78f1775226a1a451cc3919e4f995153e20b571f9 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/grll
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@78f1775226a1a451cc3919e4f995153e20b571f9 -
Trigger Event:
release
-
Statement type: