WM

wstcpyt/manim-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

19 stars 7 forks 品質 44 トレンド 22Apache-2.0

math アニメーションの mcp サーバー

概要

Manimで数学的なアニメーションを作成するためのDockerベースの環境で、CLIインターフェイスとWeb APIとモデルコンテキストプロトコル(MCP)がAIアシスタントをサポートします。 1. : 分離された、再現可能なドッカー環境でマニムを実行します。 2. : HTTP リクエストによるマニムアニメーションの作成と管理 3. : クラウドのような AI アシスタントとの直接やり取り 4. : スクリプトのアップロードと生成されたアニメーションのダウンロード - あなたのシステムにDockerとDocker Composeがインストール Docker Hub からビルド済みのイメージをプルするだけです。 アニメーションディレクトリにPythonファイルを作成する(以下を参照)、次に実行します。 [[T0] で API のドキュメントにアクセスする -p: 出力ファイルをプレビュー - -t: 透明な背景 - --save last frame: 最後のフレームのみレンダリング - -c 色: 背景色を設定 /docs エンドポイントでは、完全な API ドキュメントが利用できます.

概要(AI 翻訳)

Manimで数学的なアニメーションを作成するためのDockerベースの環境で、CLIインターフェイスとWeb APIとモデルコンテキストプロトコル(MCP)がAIアシスタントをサポートします。

## 状況

このプロジェクトは:

  1. 達成されたマニム環境:分離された、再現可能なドッカー環境でマニムを実行して下さい 2.Web API: アニメーションをHTTPリクエストで作成および管理 3.MCPの統合:ClaudeのようなAIの助手との直接相互作用 4.ファイル管理: スクリプトのアップロードと生成されたアニメーションのダウンロード

すぐにスタート

前提条件

  • あなたのシステムにDockerとDocker Composeがインストール

インストール

Option 1: プレビルドイメージ(推奨)を使用する

Docker Hub からビルド済みのイメージをプルするだけです。

その後、docker-compose で実行します。

####Option 2: ローカルに構築

  1. リポジトリのクローン化:

2。 Dockerイメージを作成する:

使用法

###CLIモード

[animations ディレクトリに Python ファイルを作成します(以下を参照)、次に実行します。

####API モード

API サーバーを起動します。

[[T1] で API のドキュメントにアクセスします。

作成アニメーション

##基本例

ファイルを作成する [animations/example.py]:

アニメーションの実行

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Manim MCP

A Docker-based environment for creating mathematical animations with Manim, featuring both a CLI interface and a web API with Model Context Protocol (MCP) support for AI assistants.

📑 Overview

This project provides:

  1. Containerized Manim Environment: Run Manim in an isolated, reproducible Docker environment
  2. Web API: Create and manage Manim animations via HTTP requests
  3. MCP Integration: Direct interaction with AI assistants like Claude
  4. File Management: Upload scripts and download generated animations

🚀 Quick Start

Prerequisites

  • Docker and Docker Compose installed on your system

Installation

Simply pull the prebuilt image from Docker Hub:

docker pull wstcpyt/manim-docker-mcp:latest

Then run it with docker-compose:

docker compose up -d

Option 2: Build Locally

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/manim-docker-mcp.git
    cd manim-docker-mcp
    
  2. Build the Docker images:

    docker compose build
    

Usage

CLI Mode

Create a Python file in the animations directory (see example below), then run:

docker compose run manim -pql animations/example.py ExampleScene

API Mode

Start the API server:

docker compose up -d manim-api

Access the API documentation at http://localhost:8000/docs

🎬 Creating Animations

Basic Example

Create a file animations/example.py:

from manim import *

class CircleToSquare(Scene):
    def construct(self):
        circle = Circle()
        circle.set_fill(BLUE, opacity=0.5)

        square = Square()
        square.set_fill(RED, opacity=0.5)

        self.play(Create(circle))
        self.wait()
        self.play(Transform(circle, square))
        self.wait()

Running the Animation

# CLI mode with preview (-p), low quality (-ql)
docker compose run manim -pql animations/example.py CircleToSquare

# API mode
curl -X POST "http://localhost:8000/run-manim?filepath=/manim/temp/circle_example.py&scene_name=CircleToSquare&quality=low_quality"

📂 Project Structure

manim-docker-mcp/
├── animations/           # Manim animation scripts
├── app/                  # FastAPI application
├── media/                # Generated animations (CLI mode)
├── output/               # Generated animations (API mode)
├── temp/                 # Temporary files
├── uploads/              # Uploaded animation scripts
├── Dockerfile            # Docker image definition
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →