MCP support for LLM CLI
Project description
[!Note] Current focus: Authorization #4
Installation
Install this plugin in the same environment as LLM:
llm install llm-tools-mcp
Usage
[!WARNING] It's recommended to use the
--taflag and approve each tool execution.
-
Create
mcp.jsonfile in~/.llm-tools-mcp.Example file:
{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "~/demo" ] } } }
-
List available tools.
llm tools list
-
Run
llmwith tools.llm --ta -T MCP "what files are in the demo directory? show me contents of one of the files (any)"
Other examples
Dynamically change your MCP config:
llm --ta -T 'MCP("/path/to/custom/mcp.json")' "your prompt here"
Development
Now (to be verified)
- Sync dependencies:
uv sync --all-extras - Run linters / type checker:
./check.sh - Run tests:
./test.sh
Before
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-tools-mcp
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
python -m pip install -e '.[test]'
To run the tests:
python -m pytest
To Do
- Release alpha version
- support all transports
- streamable http
- sse
- stdio
- Build a solid test suite
- test config file validation
- test sse with dummy server
- test stdio with dummy server
- test http streamable with dummy server (see #1)
- manual test for sse with real server
- manual test for stdio with real server
- manual test for http streamable with real server
- Redirect
stdout/stderrfrom the MCP SDK to a file or designated location - Reuse stdio connections
- Support non-stdio MCP servers
- Handle tool name conflicts (prefix with mcp server name?)
- Gather feedback on the
~/.llm-tools-mcpdirectory naming - Improve failure handling:
- When connecting to an MCP server fails
- When
mcp.jsonis malformed
- Improve this README:
- Add more detail in the Development section (mention
uv?)
- Add more detail in the Development section (mention
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 llm_tools_mcp-0.3.tar.gz.
File metadata
- Download URL: llm_tools_mcp-0.3.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57e3b0ca924438c6806a68d12fc48ed6bf530baea368c4d72e1ce5b1b9f60846
|
|
| MD5 |
2d69664886cea607b1aeea4b3e7cd6b9
|
|
| BLAKE2b-256 |
d2d220032c3bf4b23257879a33c0b2fdb79e54b0164bb1e9c59bc1b2bd1a907a
|
Provenance
The following attestation bundles were made for llm_tools_mcp-0.3.tar.gz:
Publisher:
publish.yml on VirtusLab/llm-tools-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_tools_mcp-0.3.tar.gz -
Subject digest:
57e3b0ca924438c6806a68d12fc48ed6bf530baea368c4d72e1ce5b1b9f60846 - Sigstore transparency entry: 224809212
- Sigstore integration time:
-
Permalink:
VirtusLab/llm-tools-mcp@76686c6bed90030341cdc24caa0e987fc937c9f2 -
Branch / Tag:
refs/tags/0.3 - Owner: https://github.com/VirtusLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@76686c6bed90030341cdc24caa0e987fc937c9f2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_tools_mcp-0.3-py3-none-any.whl.
File metadata
- Download URL: llm_tools_mcp-0.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07bb2f8563201401ba7dcef9bc3abdf334a118e74abded527265e2f67d31c64f
|
|
| MD5 |
2136619523856041a0340c8a5753870c
|
|
| BLAKE2b-256 |
b03b14cc5cb6ad5e84f7097bf6148dfe1e2162c7558bc455b23882cac7d7c162
|
Provenance
The following attestation bundles were made for llm_tools_mcp-0.3-py3-none-any.whl:
Publisher:
publish.yml on VirtusLab/llm-tools-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_tools_mcp-0.3-py3-none-any.whl -
Subject digest:
07bb2f8563201401ba7dcef9bc3abdf334a118e74abded527265e2f67d31c64f - Sigstore transparency entry: 224809214
- Sigstore integration time:
-
Permalink:
VirtusLab/llm-tools-mcp@76686c6bed90030341cdc24caa0e987fc937c9f2 -
Branch / Tag:
refs/tags/0.3 - Owner: https://github.com/VirtusLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@76686c6bed90030341cdc24caa0e987fc937c9f2 -
Trigger Event:
release
-
Statement type: