Logo von Inkscape MCP Server

Inkscape MCP Server

Organisation
grumpydevorg

Inkscape MCP Server - FastMCP-based server for Inkscape CLI and DOM operations with security boundaries and automatic parameter flattening

Herausgebergrumpydevorg
Repositoryinkscape-mcps
SprachePython
Forks
26
Sterne
55
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    Inkscape MCP Server stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    55 Sterne und 26 Forks im verlinkten Repository.

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)

bash
# Using uv (recommended)
uv add inkscape-mcp

# Using pip
pip install inkscape-mcp

From Source

bash
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:

bash
inkscape-mcp-cli

Start the DOM server:

bash
inkscape-mcp-dom  

Start combined server (both CLI and DOM tools):

bash
inkscape-mcp

Configuration

Configure via environment variables:

bash
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):

json
{
  "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

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

Modify SVG Elements

python
# 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

python
# 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
  • Action Allowlist: Only explicitly approved Inkscape actions permitted
  • Safe Selectors: CSS selectors limited to safe subset (no XPath injection)
  • Process Isolation: Robust subprocess management with timeouts and cleanup
  • Atomic Writes: Temporary files with atomic rename prevent corruption
  • Rate Limiting: Concurrent operation limits prevent resource abuse

Development

Setup Development Environment

bash
# Clone and setup
git clone https://github.com/yourusername/inkscape-mcp
cd inkscape-mcp

# Quick setup using just (recommended)
just setup

# Or manual setup
uv sync --dev         # Install with dev dependencies

Development Workflow

This project uses just for task running:

bash
just                  # Show available commands
just setup           # Development setup
just test            # Run tests (64 integration tests)
just lint            # Run linting with ruff
just format          # Format code with black + ruff
just type-check      # Run type checking with ty
just check           # Run all checks (lint + type + test)
just build           # Build distribution packages
just clean           # Clean build artifacts

Individual Server Testing

bash
just test-cli        # Test CLI server only
just test-dom        # Test DOM server only  
just test-combined   # Test combined server only

Claude Code Integration

Install the Package

bash
# Install from your local development copy
just build
uv pip install dist/*.whl

# Or install in development mode
uv sync --dev

Configure Claude Desktop

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "inkscape-mcp": {
      "command": "inkscape-mcp",
      "args": [],
      "env": {
        "INKS_WORKSPACE": "/Users/yourname/inkscape-workspace",
        "INKS_MAX_FILE": "52428800",
        "INKS_TIMEOUT": "120"
      }
    }
  }
}

Testing with Claude Code

  1. Setup workspace:

    bash
    mkdir -p ~/inkscape-workspace
    cd ~/inkscape-workspace
    
    # Create a test SVG file
    cat > test.svg << 'EOF'
    <?xml version="1.0" encoding="UTF-8"?>
    <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
      <circle cx="50" cy="50" r="30" fill="blue" class="shape"/>
      <rect x="20" y="20" width="20" height="20" fill="red"/>
    </svg>
    EOF
  2. Restart Claude Desktop after updating config

  3. Test in Claude Code:

    Can you list available Inkscape actions?
    
    Can you validate this SVG: /Users/yourname/inkscape-workspace/test.svg
    
    Change all circles to red color in test.svg and save as test-red.svg
    
    Export test.svg to PNG at 300 DPI

Entry Points Available

Three MCP servers are available:

  • inkscape-mcp - Combined server (5 tools: all CLI + DOM)
  • inkscape-mcp-cli - CLI only (2 tools: action_list, action_run)
  • inkscape-mcp-dom - DOM only (3 tools: dom_validate, dom_set, dom_clean)

Troubleshooting

Server not found:

bash
# Check if entry points are installed
which inkscape-mcp
uv run which inkscape-mcp

Permission errors:

bash
# Ensure workspace directory exists and is writable
mkdir -p ~/inkscape-workspace
chmod 755 ~/inkscape-workspace

Inkscape not found:

bash
# Install Inkscape
brew install inkscape  # macOS
# or check if already installed
which inkscape
# If Inkscape lives outside PATH, point INKS_INKSCAPE_BIN at the binary
# macOS/Linux example:
export INKS_INKSCAPE_BIN="/Applications/Inkscape.app/Contents/MacOS/inkscape"
# Windows PowerShell example:
$Env:INKS_INKSCAPE_BIN = "C:\Program Files\Inkscape\bin\inkscape.exe"

Manual Server Testing

If you need to test servers manually (without Claude Code):

bash
# Test entry points are working
which inkscape-mcp
which inkscape-mcp-cli  
which inkscape-mcp-dom

# Test servers start correctly
inkscape-mcp --help      # Should show MCP server info
inkscape-mcp-cli --help  # CLI server 
inkscape-mcp-dom --help  # DOM server

# Or run directly with Python
uv run python -m inkscape_mcp.cli_server
uv run python -m inkscape_mcp.dom_server  
uv run python -m inkscape_mcp.combined

Requirements

  • Python 3.9+
  • Inkscape installed and available in PATH
  • Dependencies: fastmcp, pydantic, anyio, filelock, inkex, scour

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass and code is formatted
  5. Submit a pull request

Security

This server is designed for trusted environments. While it includes multiple security hardening measures, it should not be exposed to untrusted networks or users without additional authentication and authorization layers.

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "yourusername-inkscape-mcp": {
      "command": "uvx",
      "args": [
        "inkscape-mcp"
      ]
    }
  }
}

Inkscape MCP Server MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald Inkscape MCP Server verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

Inkscape MCP Server als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für Inkscape MCP Server ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "yourusername-inkscape-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "inkscape-mcp"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von Inkscape MCP Server. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von Inkscape MCP Server.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Inkscape MCP Server bei dieser Aufgabe helfen?
Inkscape MCP Server
Gerne. Ich habe es gelesen.
Das habe ich mit Inkscape MCP Server gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server Inkscape MCP Server verwendet?

Inkscape MCP Server ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich Inkscape MCP Server MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie Inkscape MCP Server mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum Inkscape MCP Server MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald Inkscape MCP Server verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich Inkscape MCP Server MCP mit TypingMind?

Inkscape MCP Server wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt Inkscape MCP Server MCP in TypingMind bereit?

Inkscape MCP Server stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um Inkscape MCP Server MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls Inkscape MCP Server eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇