Provider-agnostic toolkit: dynamic MCP servers + agent skills for any LLM.
Project description
toolnexus (Python)
Provider-agnostic toolkit that gives any LLM the two dynamic capabilities opencode has:
- Dynamic MCP servers — read an MCP config file, connect to every server
(local stdio + remote streamable-HTTP), and expose each server tool as a
uniform
Tool. - Dynamic agent skills — read a skills folder (
**/SKILL.md) and expose a singleskilltool that loads a skill's instructions + resources on demand (progressive disclosure).
Built on the official MCP Python SDK (the mcp package). This is the Python
sibling of the js/ reference implementation; the contract is shared
(../SPEC.md).
Install
uv venv
uv pip install -e .
(Or with stdlib venv: python -m venv .venv && .venv/bin/pip install -e ..)
Quickstart
The MCP SDK is async, so the toolkit is async. Manage its lifetime with
async with:
import asyncio
from toolnexus import create_toolkit
async def main():
async with await create_toolkit(
mcp_config="../examples/mcp.json",
skills_dir="../examples/skills",
) as tk:
print(tk.mcp_status()) # {"everything": "connected", ...}
print([t.name for t in tk.tools()]) # mcp tools + "skill"
print(tk.skills_prompt()) # ## Available Skills ...
tools = tk.to_openai() # or to_anthropic() / to_gemini()
# ... call your LLM with `tools` + skills_prompt() as system text ...
# model returns a tool_call { name, arguments }
res = await tk.execute(name, arguments) # routes to the right tool
print(res.output) # feed back to the model
asyncio.run(main())
create_toolkit(...) is an async factory. The returned Toolkit is also an
async context manager; if you do not use async with, call await tk.close()
yourself to disconnect every MCP client.
API
| Python | JS / SPEC equivalent |
|---|---|
await create_toolkit(...) |
createToolkit(...) |
tk.tools() |
tk.tools() |
tk.get(name) |
tk.get(name) |
await tk.execute(name, args, ctx=None) |
tk.execute(...) |
tk.skills_prompt() |
tk.skillsPrompt() |
tk.mcp_status() |
tk.mcpStatus() |
tk.to_openai() / to_anthropic() / to_gemini() |
toOpenAI() etc. |
await tk.close() |
tk.close() |
A uniform Tool has name, description, input_schema, source
("mcp" | "skill" | "custom"), and an async execute(args, ctx=None) returning
a ToolResult(output, is_error, metadata).
Examples
examples/basic.py— connect to theeverythingMCP server, list tools, print the skills catalog, and load thehello-worldskill (progressive disclosure). Requiresnpxon PATH (for@modelcontextprotocol/server-everything).examples/openrouter_test.py— a real OpenRouter tool-calling round trip. ReadsOPENROUTER_API_KEYfrom the environment (never hardcode it).
Project details
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 toolnexus-0.1.1.tar.gz.
File metadata
- Download URL: toolnexus-0.1.1.tar.gz
- Upload date:
- Size: 76.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f59e10a88b3099b96f37b9ae372bfbf198e59596bdff56c0847ed01ffb9a54bc
|
|
| MD5 |
bf8ef48e8b94b00e936bd9ec200c216c
|
|
| BLAKE2b-256 |
2662658f32b1c0ef2b8d670c7db58abfc595e00073ffc721cd525cb60bf93fe8
|
Provenance
The following attestation bundles were made for toolnexus-0.1.1.tar.gz:
Publisher:
release.yml on muthuishere/toolnexus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toolnexus-0.1.1.tar.gz -
Subject digest:
f59e10a88b3099b96f37b9ae372bfbf198e59596bdff56c0847ed01ffb9a54bc - Sigstore transparency entry: 1968415988
- Sigstore integration time:
-
Permalink:
muthuishere/toolnexus@99cda5fb0f684b00f76c64d50609e52e4450f220 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/muthuishere
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99cda5fb0f684b00f76c64d50609e52e4450f220 -
Trigger Event:
release
-
Statement type:
File details
Details for the file toolnexus-0.1.1-py3-none-any.whl.
File metadata
- Download URL: toolnexus-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e86e7073d309b94fdb503004aa3bda930f9a28303ecf3b47dc3ab61d5c1ae38
|
|
| MD5 |
ec12972c06f8a2ab1497da0673423a08
|
|
| BLAKE2b-256 |
fe097ab26e0a2072083a93b86152e34090efe58f6eed6d0ccb8caa6bab472b9b
|
Provenance
The following attestation bundles were made for toolnexus-0.1.1-py3-none-any.whl:
Publisher:
release.yml on muthuishere/toolnexus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toolnexus-0.1.1-py3-none-any.whl -
Subject digest:
7e86e7073d309b94fdb503004aa3bda930f9a28303ecf3b47dc3ab61d5c1ae38 - Sigstore transparency entry: 1968416063
- Sigstore integration time:
-
Permalink:
muthuishere/toolnexus@99cda5fb0f684b00f76c64d50609e52e4450f220 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/muthuishere
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99cda5fb0f684b00f76c64d50609e52e4450f220 -
Trigger Event:
release
-
Statement type: