Skip to main content
Glama
Penrose MCP Server

Penrose MCP Server

by bmorphism

Penrose MCP Server

A Model Context Protocol (MCP) server for Penrose - Create beautiful mathematical diagrams through natural language.

Overview

This MCP server provides tools and resources for creating mathematical diagrams using Penrose's domain-specific languages:

  • Domain (DSL): Define mathematical types and relationships

  • Substance: Describe mathematical objects and their relationships

  • Style: Specify visual representation rules

Related MCP server: mcp-media-forge

Project Structure

  • .topos/: Research materials and documentation (gitignored)

    • penrose-research/: Design documents and specifications

    • mcp-examples/: Reference MCP server implementations

    • mcp-spec/: Official MCP protocol documentation

Development

Use the justfile to access documentation and reference materials:

# List all available commands
just --list

# View the server architecture
just architecture

# Access MCP specifications
just mcp-spec

License

MIT License - See LICENSE file for details

Available Tools

4 tools
create_domainC

Create domain-specific language (DSL) definitions

Inputs: name (required), types (required).

create_styleD

Define visual representation rules

Inputs: canvas (required), rules (required).

create_substanceC

Define mathematical objects and relationships

Inputs: domain (required), declarations (required), statements (required).

generate_diagramC

Generate diagram from domain/substance/style

Inputs: domain (required), substance (required), style (required), variation.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: create_domain defines DSLs, create_style handles visual rules, create_substance manages mathematical objects, and generate_diagram produces the final output. The descriptions clearly separate these stages in the diagram creation workflow.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with 'create_' for three tools and 'generate_' for the final step, maintaining readability and predictability. The naming convention perfectly reflects the logical flow from creation to generation.

    Tool Count5/5

    Four tools is well-scoped for a diagram generation server, covering the essential components (domain, style, substance) and the final generation step. Each tool earns its place without redundancy or missing functionality for the apparent workflow.

    Completeness4/5

    The tool set covers the core Penrose diagram creation workflow comprehensively, with no dead ends. A minor gap exists in lacking update/delete operations for existing definitions, but agents can work around this by recreating components as needed.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Generates diagrams, charts, HTML pages, and slide decks from text DSLs, enabling AI agents to embed visual assets into Markdown.
      8
      59 npm
      1
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to turn natural-language descriptions of systems, processes, and data into auto-laid-out, hand-drawn editable diagram files across 25 diagram types — architecture, flowcharts, sequence, swimlanes, ER models, Gantt, timelines and charts — with optional natural-language revision and SVG/PNG export. It can also persist an architecture as a version-controlled knowledge graph that the AI can query and lint, running fully offline in Cursor, Claude Code and Windsurf without API keys.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Turns natural-language descriptions of systems, workflows, and data into auto-laid-out, hand-drawn-style editable diagram files across 25 diagram types, with optional persistence of the architecture as a queryable, lintable knowledge graph. Runs fully offline inside Cursor, Claude Code, and Windsurf with no API keys, and can export diagrams to SVG and PNG.
      -