Skip to main content

Turtle MCP Server

An MCP (Model Context Protocol) server that lets LLMs draw beautiful turtle graphics in a live tkinter window. Ask Claude to draw stars, fractals, landscapes, flowers, and more — all rendered in real time.

Features

  • 14 drawing tools across three categories: geometric, fractals, and nature
  • Animated drawing — watch the pen move across the canvas in real time
  • Dark theme with deep blue-black background that makes colors pop
  • Neon glow effects — every stroke gets a soft halo for a glowing look
  • Visible turtle cursor — a cyan arrow follows the pen during drawing
  • 10 color palettes: rainbow, sunset, ocean, forest, pastel, jewel, autumn, cherry, earth, neon
  • Live tkinter window that persists between tool calls
  • Thread-safe architecture: asyncio MCP server + tkinter on a daemon thread
  • Pydantic-validated parameters with sensible defaults — every tool works out of the box

Requirements

  • Python 3.13+
  • uv package manager
  • A system with tkinter support (included with standard Python on Windows/macOS; install python3-tk on Linux)

Installation

No manual install needed — uvx handles everything automatically.

To install explicitly:

pip install turtle-mcp

Or with uv:

uv pip install turtle-mcp

Usage

With Claude Code

Add this to your Claude Code MCP settings (claude_desktop_config.json or .mcp.json):

{
  "mcpServers": {
    "turtle_mcp": {
      "command": "uvx",
      "args": ["turtle-mcp"]
    }
  }
}

Then ask Claude things like:

  • "Draw a 7-pointed star with the sunset palette"
  • "Draw a fractal tree in autumn with some wind"
  • "Draw a Koch snowflake"
  • "Draw a landscape at sunset with mountains and a lake"
  • "Draw a bouquet of 7 flowers in a vase with the cherry palette"

Standalone

uvx turtle-mcp

Local Development

git clone https://github.com/your-username/turtle-mcp.git
cd turtle-mcp
uv sync
uv run turtle-mcp

Tool Catalog

Geometric (5 tools)

Tool Description Key Parameters
turtle_draw_star Multi-pointed star points, size, fill_color, palette
turtle_draw_spiral Archimedean, logarithmic, or Fibonacci spiral spiral_type, turns, palette
turtle_draw_mandala Concentric ring mandala with rotational symmetry layers, symmetry, style, palette
turtle_draw_rosette Overlapping-circles rosette petals, radius, filled, palette
turtle_draw_polygon_grid Tessellation of triangles, squares, or hexagons polygon, cell_size, rows, cols

Fractals (4 tools)

Tool Description Key Parameters
turtle_draw_fractal_tree Recursive branching tree with seasonal colours depth, branch_angle, season, wind
turtle_draw_koch_snowflake Koch curve snowflake depth, size, fill_color
turtle_draw_sierpinski Sierpinski triangle depth, size, palette
turtle_draw_dragon_curve Heighway dragon curve iterations, segment_length, palette

Nature (5 tools)

Tool Description Key Parameters
turtle_draw_flower Rose, sunflower, daisy, or tulip flower_type, petal_count, palette
turtle_draw_landscape Scenic landscape with sky, mountains, lake, trees time_of_day, mountains, lake, trees
turtle_draw_sun_moon Sun or moon scene with stars and rays celestial_body, num_stars, rays
turtle_draw_house Cottage, modern, or log cabin style, wall_color, garden
turtle_draw_bouquet Flower arrangement with optional vase flower_count, vase, palette

Color Palettes

All tools that accept a palette parameter support these options:

Palette Colors
rainbow Red, orange, yellow, green, blue, indigo, violet
sunset Warm oranges, creams, deep blues
ocean Deep navy to coral
forest Dark to light greens
pastel Soft pink, peach, yellow, mint, blue
jewel Purple, mauve, gold, teal
autumn Red, amber, burgundy, olive, orange
cherry Pink to deep magenta
earth Browns and tans
neon Bright magenta, cyan, green, red, yellow

Architecture

turtle_mcp/
├── server.py              # FastMCP server + 14 tool registrations
├── utils.py               # Tk thread management, palettes, drawing helpers
└── drawings/
    ├── geometric.py       # Stars, spirals, mandalas, rosettes, tessellations
    ├── fractals.py        # Trees, Koch, Sierpinski, dragon curves
    └── nature.py          # Flowers, landscapes, celestial scenes, houses

Threading model: The MCP server runs an asyncio event loop on the main thread. A daemon thread hosts the tkinter/turtle event loop. Drawing calls are dispatched to the Tk thread via root.after(0, callback) and synchronized back with threading.Event.

Visual pipeline: Each drawing call clears the canvas, sets the dark background, enables animation (tracer(5, 0), speed(6)), shows the turtle cursor, runs the drawing function, hides the cursor, applies neon glow post-processing to all line strokes, then does a final screen update.

License

MIT

Metadata

Release files for turtle-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for turtle-mcp 0.2.0
File Size Uploaded Provenance
turtle_mcp-0.2.0.tar.gz 41.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for turtle-mcp 0.2.0
File Interpreter ABI Platform
turtle_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.8 kB

Release files / turtle_mcp-0.2.0.tar.gz

Download URL turtle_mcp-0.2.0.tar.gz
Size 41.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4272533b86c781ef002d3033fb1c21df4fdb06ac8d9b899050d534f0a7f784de
BLAKE2b-256 checksum
How to use checksums
a0679bb55669c360a11a5874440ce13fa5742c67beffc5f55aab513f3786b217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / turtle_mcp-0.2.0-py3-none-any.whl

Download URL turtle_mcp-0.2.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a78b526ea47e5940435fd38e10510dd61591b2ef5f3afc12fe8c3c94b06732a8
BLAKE2b-256 checksum
How to use checksums
e2fbcbb911e8f76b8eae6e036d1e97a9bcf1c89587f0d38630c0f3f35eb48f70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for turtle-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page