MCP Geometry Server

  • Linux
  • Apple

@luorivergoddess/mcp-geo

Asymptoteを用いて高精度な幾何学画像を生成するためのMCP(Model Context Protocol)サーバー。MCP対応のAIモデルは、Asymptoteコードを提供することで、画像生成をリクエストできます。

前提条件

このサーバーを使用する前に、以下がインストールされていることを確認してください。

  1. Node.js :バージョン16.x以上を推奨します。nodejs.orgからダウンロードできます。
  2. Asymptote : これは重要な依存関係です。asy asyラインツールがインストールされ、システムの PATH でアクセス可能になっている必要があります。
    • ダウンロードおよび詳細なインストール手順については、 Asymptote の公式 Web サイトをご覧ください。
    • 一般的なインストール方法:
      • macOS (Homebrew経由): brew install asymptote
      • Debian/Ubuntu Linux: sudo apt-get install asymptote
      • Windows: MiKTeXやTeX LiveなどのTeXディストリビューションの一部としてインストールされることが多いです。AsymptoteのbinディレクトリがPATHに追加されていることを確認してください。
    • サーバーは起動時にasy -versionをチェックし、見つからない場合はエラーを出力します。

インストール

このパッケージをグローバルにインストールするには( connectコマンドを直接実行する場合)、または別のプロジェクトの依存関係としてインストールするには:

npm install @luorivergoddess/mcp-geo

リポジトリをクローンし、開発のためにローカルで実行する場合:

  1. リポジトリをクローンします。
  2. 依存関係をインストール: npm install
  3. プロジェクトをビルドします: npm run build

使用法

サーバーの起動

パッケージがインストールされると(グローバルまたはローカルにリンクされている場合)、このパッケージが提供するconnectコマンドを使用して MCP サーバーを起動できます。このコマンドは、MCP クライアントによって呼び出されることを目的としています。

npx @luorivergoddess/mcp-geo connect

または、リポジトリをクローンしてビルドした場合:

node dist/cli.js

サーバーは起動し、 @modelcontextprotocol/sdkを使用して stdin/stdout で JSON-RPC メッセージをリッスンします。

MCPクライアント統合

MCP対応クライアント(例:VS Code with Copilot Agent Mode、Claude Desktop)をこのサーバーを使用するように設定してください。通常、クライアントにサーバーの起動方法( npx @luorivergoddess/mcp-geo connectコマンド)を指示する必要があります。

利用可能なツール: renderGeometricImage

サーバーは 1 つの主要なツールを公開します:

  • 名前: renderGeometricImage
  • 説明: Asymptote コードから画像をレンダリングします。
  • 入力スキーマ:
    { "type": "object", "properties": { "asyCode": { "type": "string", "description": "A string containing complete and valid Asymptote code to be compiled. The server executes this code directly. Ensure necessary `import` statements (e.g., `import graph;`) and settings (e.g., `unitsize(1cm);`) are included within this code block if needed." }, "outputParams": { "type": "object", "description": "Optional parameters to control the output image.", "properties": { "format": { "type": "string", "enum": ["svg", "png"], "description": "The desired output image format. \"svg\" for scalable vector graphics (recommended for diagrams and plots), \"png\" for raster graphics. Defaults to \"svg\" if not specified." }, "renderLevel": { "type": "number", "description": "For PNG output only. Specifies the rendering quality (supersampling level for antialiasing). Higher values (e.g., 4 or 8) produce smoother images but take longer to render and result in larger files. Asymptote default is 2. This server defaults to 4 if not specified and format is \"png\". Ignored for SVG output." } } } }, "required": ["asyCode"] }
  • **出力:**ツールは、コンテンツ パーツの配列を含むCallToolResult返します。
    • 成功した場合、次の内容を含むImageContent部分が含まれます。
      • type: "image"
      • mimeType: "image/svg+xml"または"image/png"
      • data: "<base64_encoded_image_data>"
    • また、Asymptote からのログを含むTextContent部分も含まれる場合があります。
    • エラーが発生した場合は、 McpErrorをスローします。

renderGeometricImage呼び出しの例 ( argumentsフィールドの JSON):

{ "asyCode": "draw(unitsquare); fill(unitsquare, lightblue);", "outputParams": { "format": "png", "renderLevel": 4 } }

クライアント互換性に関する注意事項:

  • 一部の MCP クライアントでは、サポートされる画像 MIME タイプに制限がある場合があります。
  • 例えば、 image/svg+xmlをサポートしていないクライアント(例えば、報告されている「Cherry Studio」の特定のバージョンまたは構成)でこのサーバーを使用している場合は、ツール呼び出しの引数に"outputParams": { "format": "png" }を含めて、 png形式を指定するようにしてください。形式が指定されていない場合、サーバーはデフォルトでsvgを使用します。

著者

ルオリヴァーゴッデス

ライセンス

ISC

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Asymptote コードを提供し、SVG と PNG の両方の出力形式をサポートすることで、AI モデルが正確な幾何学的画像を生成できるようにする MCP サーバー。

  1. 前提条件
    1. インストール
      1. 使用法
        1. サーバーの起動
        2. MCPクライアント統合
        3. 利用可能なツール: renderGeometricImage
      2. 著者
        1. ライセンス

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            Enables the generation of images using Together AI's models through an MCP server, supporting customizable parameters such as model selection, image dimensions, and output directory.
            Last updated -
            1
            4
            JavaScript
            MIT License
            • Apple
            • Linux
          • A
            security
            F
            license
            A
            quality
            An advanced MCP server for Cline that leverages EverArt's AI models to generate vector and raster images, supporting flexible storage, multiple formats, and robust image generation capabilities.
            Last updated -
            3
            1
            JavaScript
          • A
            security
            A
            license
            A
            quality
            A MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.
            Last updated -
            1
            2
            TypeScript
            MIT License
            • Apple
            • Linux
          • -
            security
            A
            license
            -
            quality
            A FastMCP server implementation that provides a standardized interface for accessing AI models hosted on Replicate's API, currently supporting image generation with customizable parameters.
            Last updated -
            2
            Python
            MIT License

          View all related MCP servers

          ID: 6ukap1bpd0