NK

nanayax3/krita-mcp

Developer tools

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

56 stars 24 forks 品質 68 トレンド 1MIT

nanayax3/krita-mcp は [https://github.com/nanayax3/krita-mcp.] からインポートされた MCP サーバーの候補です

概要

nanayax3/krita-mcp は [https://github.com/nanayax3/krita-mcp.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

モデルコンテキストプロトコルを介してクリタでAIペイントしてみましょう。

このブリッジでは、Claude(または任意のMCPクライアント)がキャンバス、ペイントストローク、図形、エクスポート画像などを作成できます。

使い方

2つの部品:

1。Krita Plugin(krita-plugin/) — クリタ内で実行するPythonプラグインで[localhost:5678にHTTPサーバを公開します。 ペイントコマンドを受け取り、コマンドキューでクリタのメインスレッドで実行します。

2.MCP Server(server.py) — 絵画ツールをMCPクライアントに公開するFastMCPサーバー。 MCP ツールは、Krita プラグインに HTTP リクエストに呼び出します。

セットアップ

##1. クリタプラグインをインストール

プラグインファイルをKritaプラグインディレクトリにコピーします。

| OS | パス | お問い合わせ | ウィンドウズ | [[T3] | | Linux | [[T4] | | マックス | [[T5] |

コピー:

次に、Krita:**Settings → Krita → Python Plugin Manager → 「Krita MCP Bridge」を有効にし、Kritaを再起動します。

##2. MCPサーバーをインストール

または仮想環境で:

##3.

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

README

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

Krita MCP Server

Let AI paint in Krita via the Model Context Protocol.

This bridge allows Claude (or any MCP client) to create canvases, paint strokes, draw shapes, export images, and more — all inside a running Krita instance.

How It Works

Two components:

  1. Krita Plugin (krita-plugin/) — A Python plugin that runs inside Krita, exposing an HTTP server on localhost:5678. It receives paint commands and executes them on Krita’s main thread via a command queue.

  2. MCP Server (server.py) — A FastMCP server that exposes painting tools to any MCP client. It translates MCP tool calls into HTTP requests to the Krita plugin.

MCP Client (Claude, etc.)  ←→  MCP Server (server.py)  ←→  Krita Plugin (HTTP on :5678)  ←→  Krita

Setup

1. Install the Krita Plugin

Copy the plugin files to your Krita plugins directory:

OS Path
Windows %APPDATA%\krita\pykrita\
Linux ~/.local/share/krita/pykrita/
macOS ~/Library/Application Support/krita/pykrita/

Copy both:

  • krita-plugin/kritamcp/ (the folder with __init__.py)
  • krita-plugin/kritamcp.desktop

Then in Krita: Settings → Configure Krita → Python Plugin Manager → Enable “Krita MCP Bridge” and restart Krita.

2. Install the MCP Server

pip install fastmcp httpx

Or with a virtual environment:

python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -r requirements.txt

3. Configure Your MCP Client

Add to your MCP client config (e.g., Claude Desktop’s claude_desktop_config.json):

{
  "mcpServers": {
    "krita": {
      "command": "python",
      "args": ["/path/to/server.py"]
    }
  }
}

If using a virtual environment:

{
  "mcpServers": {
    "krita": {
      "command": "/path/to/.venv/Scripts/python",
      "args": ["/path/to/server.py"]
    }
  }
}

Available Tools

Tool Description
krita_health Check if Krita is running with the plugin active
krita_new_canvas Create a new canvas (width, height, background color)
krita_set_color Set foreground paint color (hex)
krita_set_brush Set brush preset, size, and opacity
krita_stroke Paint a stroke through a list of [x, y] points
krita_fill Fill a circular area at a point
krita_draw_shape Draw rectangle, ellipse, or line
krita_get_canvas Export canvas to PNG (for AI to see progress)
krita_save Save canvas to a specific file path
krita_undo / krita_redo Undo/redo actions
krita_clear Clear canvas to a solid color
krita_get_color_at Eyedropper — sample color at a pixel
krita_list_brushes List available brush presets
krita_open_file Open an existing .kra, .png, .jpg, etc.

The Export Timeout Fix

This is the main reason this repo exists.

GitHub で README 全文を見る

インストール

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

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

設定

{ "mcpServers": { "krita": { "command": "python", "args": ["/path/to/server.py"] } } }