Math MCP Server for MacOS
MCP 入門; MacOS の Keynote に描画してテキストを追加する
このプロジェクトでは、モデル制御プロトコル(MCP)を用いた数学エージェントを実装します。このエージェントは、macOSのKeynoteで数学計算を実行し、結果を視覚的に表示できます。エージェントはKeynoteスライドに図形を描画したりテキストを追加したりできるため、数学的なプレゼンテーションの作成に役立ちます。
特徴
数学演算(加算、減算、乗算、除算など)
高度な数学関数(階乗、対数、三角関数)
ASCII値の計算と指数和演算
Keynote でのビジュアルプレゼンテーション:
長方形を描く
スライドにテキストを追加する
自動スライド管理
Related MCP server: Keynote-MCP
前提条件
Python 3.x
macOS(Keynote統合用)
システムにKeynoteがインストールされている
Google Gemini APIキー
インストール
リポジトリをクローンします。
git clone <your-repository-url>
cd keynote-drawing-text必要な依存関係をインストールします。
pip install -r requirements.txtプロジェクト ルートに
.envファイルを作成し、Gemini API キーを追加します。
GEMINI_API_KEY=your_api_key_hereプロジェクト構造
mcp-server.py: 数学ツールとKeynote統合を備えたサーバー実装が含まれていますmcp-client.py: LLMと通信してワークフローを管理するクライアントを実装します。requirements.txt: すべてのPython依存関係をリストします
使用法
クライアントスクリプト( mcp-client.py )は、MCPサーバーの起動と通信を自動的に処理します。クライアントにクエリを実行するだけで済みます。
python mcp-client.py "Your mathematical query here"例えば:
python mcp-client.py "Find the ASCII values of characters in INDIA and then return sum of exponentials of those values"クエリが指定されていない場合、スクリプトは上記の例で説明したデフォルトのクエリを使用します。
クライアントは次のことを行います。
MCPサーバーをバックグラウンドで自動的に起動する
Keynoteを開いて新しいドキュメントを作成します
要求された数学演算を実行する
スライドに長方形を描く
結果を四角形内のテキストとして追加します
注: MCPサーバーはクライアントスクリプトによって内部的に管理されるため、手動で起動する必要はありません。サーバーはすべての数学的演算とKeynoteとのやり取りを処理し、クライアントは言語モデルとの通信を管理し、全体的なワークフローを調整します。
利用可能な数学ツール
基本操作:
追加(
add)引き算(
subtract)掛け算(
multiply)割り算(
divide)パワー(
power)平方根(
sqrt)立方根(
cbrt)
高度な操作:
階乗(
factorial)自然対数(
log)残り(
remainder)三角関数(
sin、cos、tan)フィボナッチ数列 (
fibonacci_numbers)ASCII値の計算(
strings_to_chars_to_int)指数和 (
int_list_to_exponential_sum)
Keynote統合
このプロジェクトには、Keynote 統合用のツールが含まれています。
mac_open_keynote: Keynoteを開いて新しいドキュメントを作成しますmac_draw_rectangle: 現在のスライドに四角形を描画しますmac_add_text_in_keynote: 現在のスライドにテキストを追加します
エラー処理
システムには、次のような包括的なエラー処理が含まれています。
API通信の問題
無効な数学演算
Keynoteの統合問題
LLM 応答のタイムアウト処理
ツール
フレームワークのモデル制御プロトコル(MCP)
言語モデル用のGoogle Gemini
プレゼンテーションプラットフォームのApple Keynote
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
This server cannot be deployed
Maintenance
Related MCP Connectors
Precision math engine for AI agents. 203 exact methods. Zero hallucination.
Agent-Native Google Slides - generate and edit React presentations
MCPCalc gives agents access to a comprehensive library of calculators spanning finance, math, health, construction, engineering, food, automotive, and more. It includes a full Computer Algebra System (CAS) and a grid-based Spreadsheet calculator.
Loan & mortgage calculator, compound interest, ROI, crypto prices, FX conversion for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to control Apple Keynote presentations through AppleScript automation, supporting comprehensive slide creation, management, and content operations.45 PyPI76MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to control Keynote presentations through AppleScript automation, supporting slide operations, theme-aware content management, and export functions.11MIT
- FlicenseAqualityCmaintenanceLocal macOS MCP server that reads, edits, and exports Apple Keynote presentations via JXA. Enables Claude to visually analyze slides, apply design changes, and iterate on presentations directly.191-
- AlicenseNot gradedqualityDmaintenanceMCP server for step-by-step mathematical reasoning and planning, enabling AI agents to execute calculations and perform GUI actions like opening PowerPoint.1Apache 2.0