🛠️ QuantaLogic MCP Toolbox
A generic adapter for interacting with one or more MCP servers via JSON-based configuration, with automatic tool discovery, caching, and session management.
📋 Table of Contents
🚀 Installation
Install from PyPI:
pip install quantalogic-toolbox-mcp
Or with Poetry:
poetry add quantalogic-toolbox-mcp
⚙️ Configuration
By default, the toolbox reads JSON files from ./mcp_config/ or the directory set by MCP_CONFIG_DIR. You can also specify a single file via the MCP_CONFIG_FILE environment variable.
Create a config file (mcp.json) in mcp_config/ with the following structure:
{
"mcpServers": {
"sqlite": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"mcp-test:/mcp",
"mcp/sqlite",
"--db-path",
"/mcp/test.db"
]
},
"mcp_hn": {
"command": "uvx",
"args": ["mcp-hn"]
},
"fetcher": {
"command": "npx",
"args": ["-y", "fetcher-mcp"]
},
"job_search": {
"command": "npx",
"args": ["-y", "job-searchoor"]
},
"edgeone": {
"command": "npx",
"args": ["edgeone-pages-mcp"]
}
}
}
- command: Executable or Docker alias
- args: Argument list to launch the server
Environment variables in env entries can use {{ env.VAR_NAME }} and will be resolved at runtime.
🏃 Quickstart Example
from quantalogic_toolbox_mcp.tools import get_tools
import asyncio
async def main():
# Discover core and dynamic tools
tools = get_tools()
# List configured servers
from quantalogic_toolbox_mcp.tools import list_servers
servers = await list_servers()
print("Servers:", servers)
# List tools on a server
resources = await tools[0]('sqlite') # mcp_list_tools
print("Tools on sqlite:", resources)
# Call a specific tool dynamically
dynamic = [t for t in tools if hasattr(t, 'server_name') and t.server_name == 'sqlite'][0]
result = await dynamic(input_file="/mcp/test.db")
print("Result:", result)
asyncio.run(main())
🏛️ Architecture
%%{init: { 'theme': 'base', 'themeVariables': {
'primaryColor': '#A3C9E2',
'secondaryColor': '#B7E3CC',
'tertiaryColor': '#F9E0BB',
'lineColor': '#B5B5B5',
'fontFamily': 'Inter, Arial, sans-serif'
} }}%%
flowchart TD
A[Load JSON configs] --> B{Cache valid?}
B -- Yes --> C[Load servers & tools from cache]
B -- No --> D[Read & resolve configs]
D --> E[Fetch tool lists & details]
C & E --> F[Populate `tools_cache`]
F --> G["get_tools()"]
G --> H[Execute core or dynamic tools]
H --> I[Parse & return results]
📖 API Reference
-
get_tools() →
List[Callable]- Returns core functions and dynamic tool wrappers.
-
mcp_list_resources(server_name: str) →
List[str] -
mcp_list_tools(server_name: str) →
List[str] -
mcp_call_tool(server_name: str, tool_name: str, arguments: dict) →
Any -
list_servers() →
List[str]
For full signatures and details, refer to toolboxes/quantalogic-toolbox-mcp/quantalogic_toolbox_mcp/tools.py.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Add tests in
tests/ - Run
pytestandruff . - Submit a pull request against
main
Please see CONTRIBUTING.md for more details.
📜 License
This project is licensed under the MIT License – see the LICENSE file for details.
Metadata
Release files for quantalogic_toolbox_mcp 0.13.0
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 |
|---|---|---|---|---|
| quantalogic_toolbox_mcp-0.13.0.tar.gz | 14.7 kB | Without provenance | Details for quantalogic_toolbox_mcp-0.13.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantalogic_toolbox_mcp-0.13.0-py3-none-any.whl | Python 3 | none | any | Details for quantalogic_toolbox_mcp-0.13.0-py3-none-any.whl |
Total release size: 29.4 kB
Release files / quantalogic_toolbox_mcp-0.13.0.tar.gz
| Download URL | quantalogic_toolbox_mcp-0.13.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
568a142b3039c999ff5bb70780a6a26050b5a31647d1aee7696b7d5f7db37a4e
|
|
BLAKE2b-256 checksum How to use checksums |
85cab840e86b2d9f9e218a4722d5dc112fa8a3e0ba2baa6cb1e75331a291dfb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.12.8 Darwin/24.4.0
|
Release files / quantalogic_toolbox_mcp-0.13.0-py3-none-any.whl
| Download URL | quantalogic_toolbox_mcp-0.13.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7a7634c8164b5d080ee6ec7930afa986ae73d0ace1dc16caffa87b178296eea
|
|
BLAKE2b-256 checksum How to use checksums |
8a800fa61a5b5c195671e7a865708d49b6699803da27e08fbc20a34550a05730
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.12.8 Darwin/24.4.0
|
Security for quantalogic_toolbox_mcp 0.13.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.