fomenko-ai/mcp-lite
Library for local work with AI tools without running MCP server.
Platform-specific configuration:
{
"mcpServers": {
"mcp-lite": {
"command": "npx",
"args": [
"-y",
"mcp-lite"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
The library for local work with AI tools without running MCP server.
uv add mcp-litefrom mcp_lite import MCPfrom typing import List
from mcp_lite import MCP, Tool
mcp = MCP()
@mcp.tool
def sync_add(a, b):
"""
Call this function if you need to add two numbers.
Args:
a (int | float): The first number.
b (int | float): The second number.
"""
return a + b
@mcp.tool
async def async_mul(a, b):
"""
Call this function if you need to multiply two numbers.
Args:
a (int | float): The first number.
b (int | float): The second number.
"""
return a * b
tools: List[Tool] = mcp.list_tools()
tools_description = "\n".join(
f"- {tool.name}: {tool.description}"
for tool in 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)
Loading reviews...