MCP Geometry Server
The MCP Geometry Server renders precise geometric images by executing Asymptote code. With this server, you can:
Generate high-quality geometric images from valid Asymptote code
Choose output formats: SVG (default, vector graphics) or PNG (raster graphics)
Control PNG rendering quality with the
renderLevelparameter for anti-aliasing adjustmentInteract through the
renderGeometricImagetool, which returns base64-encoded image data and compilation logsIntegrate with MCP-compatible clients like VS Code with Copilot Agent Mode or Claude Desktop
Use on any platform where Node.js and Asymptote (
asy) are installed
Supports installation of the required Asymptote dependency on Debian Linux systems.
Supports installation of the required Asymptote dependency via Homebrew on macOS systems.
Provides installation instructions and compatibility for running on Linux operating systems.
Provides installation instructions and compatibility for running on macOS operating systems.
Runs on Node.js (version 16.x or higher) to support the MCP server functionality.
Available as an npm package for installation and dependency management.
Integrates with Asymptote, a vector graphics language hosted on SourceForge, to render precise geometric images from code.
Renders geometric images in SVG format, allowing for scalable vector graphics output.
Supports installation of the required Asymptote dependency on Ubuntu Linux systems.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Geometry Serverdraw a blue circle with radius 3cm and a red square with side length 2cm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@luorivergoddess/mcp-geo
An MCP (Model Context Protocol) server for generating precise geometric images using Asymptote. This server allows AI models compatible with MCP to request image generation by providing Asymptote code.
Prerequisites
Before using this server, please ensure you have the following installed:
Node.js: Version 16.x or higher is recommended. You can download it from nodejs.org.
Asymptote: This is a critical dependency. The
asycommand-line tool must be installed and accessible in your system's PATH.Visit the Asymptote official website for download and detailed installation instructions.
Common installation methods:
macOS (via Homebrew):
brew install asymptoteDebian/Ubuntu Linux:
sudo apt-get install asymptoteWindows: Often installed as part of TeX distributions like MiKTeX or TeX Live. Ensure the Asymptote
bindirectory is added to your PATH.
The server will attempt to check for
asy -versionon startup and print an error if it's not found.
Related MCP server: GGB Web MCP
Installation
To install this package globally (if you intend to run connect command directly) or as a dependency in another project:
npm install @luorivergoddess/mcp-geoIf you've cloned the repository and want to run it locally for development:
Clone the repository.
Install dependencies:
npm installBuild the project:
npm run build
Usage
Starting the Server
Once the package is installed (e.g., globally or linked locally), you can start the MCP server using the connect command provided by this package. This command is intended to be invoked by an MCP client.
npx @luorivergoddess/mcp-geo connectOr, if you have cloned the repository and built it:
node dist/cli.jsThe server will start and listen for JSON-RPC messages on stdin/stdout, using the @modelcontextprotocol/sdk.
MCP Client Integration
Configure your MCP-compatible client (e.g., VS Code with Copilot Agent Mode, Claude Desktop) to use this server. This usually involves telling the client how to start the server, which would be the npx @luorivergoddess/mcp-geo connect command.
Available Tool: renderGeometricImage
The server exposes one primary tool:
Name:
renderGeometricImageDescription: Renders an image from Asymptote code.
Input Schema:
{ "type": "object", "properties": { "asyCode": { "type": "string", "description": "A string containing complete and valid Asymptote code to be compiled. The server executes this code directly. Ensure necessary `import` statements (e.g., `import graph;`) and settings (e.g., `unitsize(1cm);`) are included within this code block if needed." }, "outputParams": { "type": "object", "description": "Optional parameters to control the output image.", "properties": { "format": { "type": "string", "enum": ["svg", "png"], "description": "The desired output image format. \"svg\" for scalable vector graphics (recommended for diagrams and plots), \"png\" for raster graphics. Defaults to \"svg\" if not specified." }, "renderLevel": { "type": "number", "description": "For PNG output only. Specifies the rendering quality (supersampling level for antialiasing). Higher values (e.g., 4 or 8) produce smoother images but take longer to render and result in larger files. Asymptote default is 2. This server defaults to 4 if not specified and format is \"png\". Ignored for SVG output." } } } }, "required": ["asyCode"] }Output: The tool returns a
CallToolResultcontaining an array of content parts.If successful, it includes an
ImageContentpart with:type: "image"mimeType: "image/svg+xml"or"image/png"data: "<base64_encoded_image_data>"
It may also include a
TextContentpart with logs from Asymptote.If an error occurs, it throws an
McpError.
Example renderGeometricImage call (JSON for arguments field):
{
"asyCode": "draw(unitsquare); fill(unitsquare, lightblue);",
"outputParams": {
"format": "png",
"renderLevel": 4
}
}Client Compatibility Notes:
Some MCP clients may have limitations on supported image MIME types.
For instance, if you are using this server with a client that does not support
image/svg+xml(e.g., certain versions or configurations of "Cherry Studio" as reported), please ensure you request thepngformat by including"outputParams": { "format": "png" }in your tool call arguments. The server defaults tosvgif no format is specified.
Author
luorivergoddess
License
ISC
Available Tools
1 toolrenderGeometricImageB
Renders an image from Asymptote code.
| Name | Required | Description | Default |
|---|---|---|---|
| asyCode | Yes | A string containing complete and valid Asymptote code to be compiled. The server executes this code directly. Ensure necessary `import` statements (e.g., `import graph;`) and settings (e.g., `unitsize(1cm);`) are included within this code block if needed. | |
| outputParams | No | Optional parameters to control the output image. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool 'Renders an image' and implies execution of code, but it doesn't mention behavioral traits like error handling (e.g., what happens with invalid code), performance (e.g., rendering time), or output specifics (e.g., image dimensions). The description is minimal, leaving gaps in transparency for a code-execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence: 'Renders an image from Asymptote code.' It is front-loaded with the core purpose and has zero waste, making it highly concise and well-structured for its simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (code execution with optional parameters), no annotations, and no output schema, the description is incomplete. It doesn't cover output details (e.g., what the image looks like, error responses) or behavioral aspects. However, the schema provides good parameter documentation, so it's minimally adequate but lacks context for a tool that executes external code.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond the schema's details on 'asyCode' and 'outputParams'. It doesn't explain parameter interactions or provide examples, so it meets the baseline for high schema coverage without compensating value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Renders an image from Asymptote code.' It specifies the verb ('Renders') and resource ('image'), and while there are no sibling tools to distinguish from, the description is specific about the input type (Asymptote code). However, it doesn't mention what kind of image is produced (e.g., geometric diagrams, plots) beyond the Asymptote context, which could be more precise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, as there are no sibling tools mentioned. It lacks context about typical use cases (e.g., generating diagrams for documentation, creating plots) or prerequisites (e.g., needing valid Asymptote syntax). Without siblings, the score is based on the absence of any usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
renderGeometricImage
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clearly defined purpose that cannot be confused with any other tool in the set.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'renderGeometricImage' follows a clear verb_noun pattern, and there are no other tools to compare it against for inconsistency.
A single tool is too few for a server named 'MCP Geometry Server', which suggests a broader scope in geometry. This minimal set feels thin and incomplete, likely requiring agents to rely heavily on other servers for basic geometric operations.
The tool surface is severely incomplete for a geometry domain. It only provides image rendering from Asymptote code, missing obvious operations like calculating areas, distances, transformations, or generating geometric shapes, which are fundamental to geometry.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for Qwen Image 3 AI image generation
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that executes Manim Python scripts to generate and return rendered animations. It enables users to create mathematical and programmatic videos dynamically through natural language interfaces.3MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI to interact with GeoGebra for mathematical visualization, offering over 25 tools for geometry, functions, algebra, and more.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to create beautiful ASCII diagrams using Unicode box-drawing characters, with support for stateful canvas operations, multiple shape types, and style customization.2-
- AlicenseNot gradedqualityAmaintenanceMCP server for creating math animations with manim, enabling AI-driven real-time interactive creation and browser preview.1MIT