TinyAgents: LLM + MCP Tools
TinyAgents is a minimalist implementation of agents powered by LLMs and Model Context Protocol (MCP) tools.
This project is inspired by the MCP Client Quickstart and provides a lightweight foundation for building LLM-based agent workflows.
The repository includes two different agent implementations:
TinyToolCallingAgent
is a general-purpose agent that can solve tasks by calling external tools. It:
Usage:
python tinytoolcallingagent.py <path_to_server_script>
TinyCodeAgent
is designed to solve tasks using Python code. It connects to an MCP server to access tools and can:
Usage:
python tinycodeagent.py <path_to_server_script>
Both agents share these capabilities:
The repository includes an example MCP server implementation in the servers/weather
directory. This server provides tools for accessing weather data from the National Weather Service API:
get_alerts
: Retrieves weather alerts for a specified US stateget_forecast
: Gets a detailed weather forecast for a location based on latitude and longitudeTo use the weather server with one of the agents:
# With TinyToolCallingAgent
python tinytoolcallingagent.py servers/weather/weather.py
# With TinyCodeAgent
python tinycodeagent.py servers/weather/weather.py
The TinyCodeAgent should include a basic Python code executor that:
This feature will enable users to immediately see the results of code solutions provided by the agent, making it more interactive and useful for programming tasks.
Example queries for the weather server:
Note: The MCP server is intended for testing and development purposes only.
{ "mcpServers": { "tinyagents": { "command": "python", "args": [] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories