Rohini Gaonkar/mcp-math-macos
Built by Metorial, the integration platform for agentic AI.
Rohini Gaonkar/mcp-math-macos
Server Summary
Mathematical operations
Advanced mathematical functions
ASCII value calculations
Drawing shapes in Keynote
Adding text to slides
Automatic slide management
This project implements a math agent using Model Control Protocol (MCP) that can perform mathematical calculations and present results visually in Keynote on macOS. The agent can draw shapes and add text to Keynote slides, making it useful for creating mathematical presentations.
git clone
cd keynote-drawing-text
pip install -r requirements.txt
.env
file in the project root and add your Gemini API key:GEMINI_API_KEY=your_api_key_here
mcp-server.py
: Contains the server implementation with mathematical tools and Keynote integrationmcp-client.py
: Implements the client that communicates with the LLM and manages the workflowrequirements.txt
: Lists all Python dependenciesThe client script (mcp-client.py
) automatically handles the MCP server startup and communication. You only need to run the client with your query:
python mcp-client.py "Your mathematical query here"
For example:
python mcp-client.py "Find the ASCII values of characters in INDIA and then return sum of exponentials of those values"
If no query is provided, the script will use a default query mentioned in the above example.
The client will:
Note: The MCP server is managed internally by the client script, so you don't need to start it manually. The server handles all the mathematical operations and Keynote interactions, while the client manages the communication with the language model and orchestrates the overall workflow.
Basic Operations:
add
)subtract
)multiply
)divide
)power
)sqrt
)cbrt
)Advanced Operations:
factorial
)log
)remainder
)sin
, cos
, tan
)fibonacci_numbers
)strings_to_chars_to_int
)int_list_to_exponential_sum
)The project includes tools for Keynote integration:
mac_open_keynote
: Opens Keynote and creates a new documentmac_draw_rectangle
: Draws a rectangle on the current slidemac_add_text_in_keynote
: Adds text to the current slideThe system includes comprehensive error handling for:
Contributions are welcome! Please feel free to submit a Pull Request.