MCPcopy Index your code
hub / github.com/VirtusLab/llm-tools-mcp

github.com/VirtusLab/llm-tools-mcp @0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4 ↗ · + Follow
39 symbols 194 edges 8 files 4 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

llm-tools-mcp

mcp-logo

Connect to MCP servers right from your shell. Plugin for llm (by @simonw).

PyPI Changelog Tests License

demo-long

[!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 --ta flag and approve each tool execution.

  1. Create mcp.json file in ~/.llm-tools-mcp.

Example file:

json { "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "~/demo" ] } } }

  1. List available tools.

    [!WARNING] llm tools is not implemented for dynamic toolboxes (see this), so tools loaded as part of MCP won't be visible.

sh llm tools list

  1. Run llm with tools.

sh 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
  • Run end to end tests: ./e2e/e2e-docker.sh

To Do

  • [x] Release alpha version
  • [x] support all transports
  • [x] streamable http
  • [x] sse
  • [x] stdio
  • [ ] Build a solid test suite
  • [x] test config file validation
  • [x] test sse with dummy server
  • [x] test stdio with dummy server
  • [x] test http streamable with dummy server (see #1)
  • [x] manual test for sse with real server
  • [x] manual test for stdio with real server
  • [x] manual test for http streamable with real server
  • [x] Redirect stdout/stderr from the MCP SDK to a file or designated location
  • [ ] Reuse stdio connections
  • [x] Support non-stdio MCP servers
  • [ ] Handle tool name conflicts (prefix with mcp server name?)
  • [ ] Gather feedback on the ~/.llm-tools-mcp directory naming
  • [x] Improve failure handling:
  • [x] When connecting to an MCP server fails
  • [x] When mcp.json is malformed
  • [ ] Improve this README:
  • [ ] Add more detail in the Development section (mention uv?)

Core symbols most depended-on inside this repo

for_json_content
called by 7
src/llm_tools_mcp/mcp_config.py
get
called by 7
src/llm_tools_mcp/mcp_config.py
get_all_tools
called by 6
src/llm_tools_mcp/mcp_client.py
call_tool
called by 5
src/llm_tools_mcp/mcp_client.py
_client_session_with_logging
called by 3
src/llm_tools_mcp/mcp_client.py
_client_session
called by 2
src/llm_tools_mcp/mcp_client.py
_log_file_for_session
called by 1
src/llm_tools_mcp/mcp_client.py
get_tools_for
called by 1
src/llm_tools_mcp/mcp_client.py

Shape

Function 18
Method 13
Class 8

Languages

Python100%

Modules by API surface

src/llm_tools_mcp/mcp_config.py11 symbols
tests/test_llm_tools_mcp.py8 symbols
src/llm_tools_mcp/mcp_client.py8 symbols
src/llm_tools_mcp/register_tools.py6 symbols
tests/test_config_validation.py4 symbols
tests/test_integration.py2 symbols

For agents

$ claude mcp add llm-tools-mcp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page