Inkscape MCP Server logo

Inkscape MCP Server

Organization
grumpydevorg

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

Publishergrumpydevorg
Repositoryinkscape-mcps
LanguagePython
Forks
26
Stars
55
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Inkscape MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    55 stars and 26 forks from the linked 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
Prerequisites:

Node.js 18+

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

Use Inkscape MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Inkscape MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Inkscape MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Inkscape MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "yourusername-inkscape-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "inkscape-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Inkscape MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Inkscape MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Inkscape MCP Server to help me with this task?
Inkscape MCP Server
Sure. I read it.
Here is what I found using Inkscape MCP Server.

Frequently asked questions

What is the Inkscape MCP Server MCP server used for?

Inkscape MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Inkscape MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Inkscape MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Inkscape MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Inkscape MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Inkscape MCP Server MCP to TypingMind?

Inkscape MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Inkscape MCP Server MCP provide in TypingMind?

Inkscape MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Inkscape MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Inkscape MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇