The library for local work with AI tools without running MCP server.
Project description
mcp-lite
The library for local work with AI tools without running MCP server.
Installation
pip install mcp-lite
Import
from mcp_lite import MCP
Usage
mcp = MCP()
@mcp.tool
def sync_add(a, b):
return a + b
@mcp.tool
async def async_mul(a, b):
return a * b
tools = mcp.list_tools()
# Some code where AI calls some tools :)
for tool_call in tool_calls:
tool_name = tool_call.get("tool_name")
tool_args = tool_call.get("args", {})
tool_result = await mcp.call_tool(tool_name, tool_args)
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
mcp_lite-0.1.0.tar.gz
(4.0 kB
view details)
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 mcp_lite-0.1.0.tar.gz.
File metadata
- Download URL: mcp_lite-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97a2249479d8901598a8d27d92a320bf67d9a9bbd4e63b88da1b7acac2a44888
|
|
| MD5 |
164ee9518485be12106001543aeb9301
|
|
| BLAKE2b-256 |
dab45f1c695d3b4e8bcc3edb352c081bea1b85b6e3b4cfa48eb0277817ce83df
|
File details
Details for the file mcp_lite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_lite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79cea9489f25f1e554143a58322ecab325add8db2d859e28fb351dc9b1ba5f1d
|
|
| MD5 |
c26cc9ef4f0285a959002bd519ac6551
|
|
| BLAKE2b-256 |
e28059e29e74fdb6df39e37c098917596d39b3aa02ed1e9aaf659e935b2d3c39
|