GI

grumpydevorg/inkscape-mcps

Developer tools

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

57 stars 26 forks 品質 67 トレンド 14MIT

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

概要

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

概要(AI 翻訳)

インクスケープ操作用のセキュアなMCP(Model Context Protocol)サーバーで、CLIアクションとDOM操作の両方の機能を提供します。

##特徴

  • CLI Actions: Inkscapeコマンド・ラインのアクションを実行(エクスポート、変換、パス操作)
  • ダム操作: 直接SVG DOM編集とCSSセレクター
  • セキュリティ強化:ワークスペーススコープパス、サイズ制限、アクションレタス
  • 非同期サポート:レート制限による非ブロック操作
  • 原子操作: 安全なファイル書き込みとプロセスのクリーンアップ

インストール

##PyPI から (公開されたとき)

ソースから

使用法

##個別サーバーとして

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

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

結合されたサーバー(CLI および DOM 用具両方)を始めて下さい:

設定

環境変数による構成:

MCP クライアントの統合

MCP クライアント構成 (例、Claude デスクトップ):

利用可能なツール

##CLI ツール ([T0])

  • [action_list] - 利用可能なすべてのインクスケープアクションのリスト
  • [action_run - ドキュメントのインキケープアクションを実行

DOM ツール ([[T3])

  • [dom_validate - SVG 文書構造の検証
  • [dom_set - CSSセレクターを使用して属性/スタイルを設定

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

README

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

Inkscape MCP Server

A secure, hardened MCP (Model Context Protocol) server for Inkscape operations, providing both CLI actions and DOM manipulation capabilities.

Features

  • CLI Actions: Execute Inkscape command-line actions (export, transforms, path operations)
  • DOM Manipulation: Direct SVG DOM editing with CSS selectors
  • Security Hardened: Workspace-scoped paths, size limits, action allowlists
  • Async Support: Non-blocking operations with rate limiting
  • Atomic Operations: Safe file writes and process cleanup

Installation

From PyPI (when published)

# Using uv (recommended)
uv add inkscape-mcp

# Using pip
pip install inkscape-mcp

From Source

git clone https://github.com/yourusername/inkscape-mcp
cd inkscape-mcp

# Quick development setup
./scripts/dev-setup

# Or manual setup
uv sync --dev         # Install with dev dependencies
uv build              # Build distribution packages

Usage

As Individual Servers

Start the CLI server:

inkscape-mcp-cli

Start the DOM server:

inkscape-mcp-dom  

Start combined server (both CLI and DOM tools):

inkscape-mcp

Configuration

Configure via environment variables:

export INKS_WORKSPACE="./my-workspace"  # Default: ./inkspace
export INKS_MAX_FILE="104857600"        # Default: 50MB
export INKS_TIMEOUT="120"               # Default: 60s
export INKS_MAX_CONC="8"                # Default: 4

MCP Client Integration

Add to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "inkscape-mcp": {
      "command": "inkscape-mcp",
      "env": {
        "INKS_WORKSPACE": "/path/to/workspace",
        "INKS_MAX_FILE": "52428800"
      }
    }
  }
}

Available Tools

CLI Tools (inkscape-mcp-cli)

  • action_list - List all available Inkscape actions
  • action_run - Execute Inkscape actions on documents

DOM Tools (inkscape-mcp-dom)

  • dom_validate - Validate SVG document structure
  • dom_set - Set attributes/styles using CSS selectors
  • dom_clean - Clean/optimize SVG using scour

Examples

Export SVG to PNG

# Via MCP client
await action_run({
    "doc": {"type": "file", "path": "input.svg"},
    "export": {"type": "png", "out": "output.png", "dpi": 300}
})

Modify SVG Elements

# Change fill color of all circles
await dom_set({
    "doc": {"type": "file", "path": "input.svg"},
    "ops": [{
        "selector": {"type": "css", "value": "circle"},
        "set": {"style.fill": "#ff6600"}
    }],
    "save_as": "modified.svg"
})

Path Operations

# Union selected paths
await action_run({
    "doc": {"type": "file", "path": "input.svg"},
    "actions": ["select-all", "path-union"]
})

Security Features

  • Workspace Scoping: All file operations restricted to configured workspace
  • Size Limits: Configurable file size caps prevent resource exhaustion
GitHub で README 全文を見る

インストール

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

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

設定

{ "mcpServers": { "inkscape-mcp": { "command": "inkscape-mcp", "env": { "INKS_WORKSPACE": "/path/to/workspace", "INKS_MAX_FILE": "52428800" } } } }