This release is a pre-release and may not be stable for production use.
llm-mcp-client
Access tools from MCP servers as LLM tools
Installation
Install this plugin in the same environment as LLM.
llm install llm-mcp-client
Usage
This plugin registers a toolbox called MCP which connects to an MCP server, discovers the tools it exposes and makes them available as LLM tools.
Pass the URL of an MCP server to the toolbox:
llm -T 'MCP("https://example.com/mcp")' 'Ask something that needs a tool' --td
The --td option shows details of the tool calls as they execute.
It works in llm chat too:
llm chat -T 'MCP("https://example.com/mcp")'
Protocol modes
By default the client negotiates the protocol automatically. You can force a specific mode with the mode= argument:
# Force modern stateless MCP:
llm -T 'MCP("https://example.com/mcp", mode="stateless")' '...'
# Force the legacy initialize handshake:
llm -T 'MCP("https://example.com/mcp", mode="legacy")' '...'
Tool name prefixes
If you are using tools from more than one server and their names might clash, give each server a prefix:
llm -T 'MCP("https://one.example.com/mcp", prefix="one_")' \
-T 'MCP("https://two.example.com/mcp", prefix="two_")' '...'
Python API
import llm
from llm_mcp_client import MCP
model = llm.get_model("gpt-4.1-mini")
result = model.chain(
"Ask something that needs a tool",
tools=[MCP("https://example.com/mcp")],
).text()
Tool results containing MCP image or audio content are returned to the model as LLM attachments. An MCP error result raises llm_mcp_client.MCPToolError, which LLM passes back to the model as an error message.
Development
To set up this plugin locally, first checkout the code. Then run the tests with uv:
cd llm-mcp-client
uv run pytest
To run LLM with your in-development plugin:
uv run llm --help
Metadata
Release files for llm-mcp-client 0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_mcp_client-0.1a0.tar.gz | 9.3 kB | With provenance | Details for llm_mcp_client-0.1a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_mcp_client-0.1a0-py3-none-any.whl | Python 3 | none | any | Details for llm_mcp_client-0.1a0-py3-none-any.whl |
Total release size: 18.2 kB
Release files / llm_mcp_client-0.1a0.tar.gz
| Download URL | llm_mcp_client-0.1a0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1c55e7d82a662e411ab36c61576d6b67d4e54ad5879dd761e7d396a3ef58784
|
|
BLAKE2b-256 checksum How to use checksums |
e0eabfde7813e1b3387858f4bcb905ddd0452b8a68ba16f7a8239b720c8fdcc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 31, 2026.
Transparency logRelease files / llm_mcp_client-0.1a0-py3-none-any.whl
| Download URL | llm_mcp_client-0.1a0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97fe39d4508262f48ace8e83ddb5d76269896e30e7a886391720f6ec8bfd2b59
|
|
BLAKE2b-256 checksum How to use checksums |
e2c7c290918fbeb1dbc99d22388f05756d9f20ad1d4c17e34204ce092ae70a66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 31, 2026.
Transparency logSecurity for llm-mcp-client 0.1a0
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for llm_mcp_client-0.1a0.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 31, 2026.
Transparency logA 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.