Skip to main content
Glama

@luorivergoddess/mcp-geo

Сервер MCP (Model Context Protocol) для генерации точных геометрических изображений с использованием Asymptote. Этот сервер позволяет моделям ИИ, совместимым с MCP, запрашивать генерацию изображений, предоставляя код Asymptote.

Предпосылки

Перед использованием этого сервера убедитесь, что у вас установлено следующее:

  1. Node.js : рекомендуется версия 16.x или выше. Вы можете загрузить ее с nodejs.org .

  2. Asymptote : Это критическая зависимость. Инструмент командной строки asy должен быть установлен и доступен в PATH вашей системы.

    • Посетите официальный сайт Asymptote для загрузки и получения подробных инструкций по установке.

    • Распространенные методы установки:

      • macOS (через Homebrew): brew install asymptote

      • Debian/Ubuntu Linux: sudo apt-get install asymptote

      • Windows: Часто устанавливается как часть дистрибутивов TeX, таких как MiKTeX или TeX Live. Убедитесь, что каталог Asymptote bin добавлен в ваш PATH.

    • Сервер попытается проверить наличие asy -version при запуске и выведет ошибку, если она не будет найдена.

Related MCP server: GGB Web MCP

Установка

Чтобы установить этот пакет глобально (если вы собираетесь запустить команду connect напрямую) или как зависимость в другом проекте:

npm install @luorivergoddess/mcp-geo

Если вы клонировали репозиторий и хотите запустить его локально для разработки:

  1. Клонируйте репозиторий.

  2. Установка зависимостей: npm install

  3. Соберите проект: npm run build

Использование

Запуск сервера

После установки пакета (например, глобально или локально) вы можете запустить сервер MCP с помощью команды connect предоставленной этим пакетом. Эта команда предназначена для вызова клиентом MCP.

npx @luorivergoddess/mcp-geo connect

Или, если вы клонировали репозиторий и собрали его:

node dist/cli.js

Сервер запустится и будет прослушивать сообщения JSON-RPC на stdin/stdout, используя @modelcontextprotocol/sdk .

Интеграция клиента MCP

Настройте MCP-совместимый клиент (например, VS Code с Copilot Agent Mode, Claude Desktop) для использования этого сервера. Обычно это включает в себя указание клиенту, как запустить сервер, что будет командой npx @luorivergoddess/mcp-geo connect .

Доступный инструмент: renderGeometricImage

Сервер предоставляет один основной инструмент:

  • Имя: renderGeometricImage

  • Описание: Визуализирует изображение из кода Asymptote.

  • Схема ввода:

    {
      "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"]
    }
  • Вывод: инструмент возвращает CallToolResult , содержащий массив частей контента.

    • В случае успеха он включает часть ImageContent со следующими элементами:

      • type: "image"

      • mimeType: "image/svg+xml" или "image/png"

      • data: "<base64_encoded_image_data>"

    • Он также может включать часть TextContent с журналами из Asymptote.

    • Если возникает ошибка, выдается McpError .

Пример вызова renderGeometricImage (JSON для поля arguments ):

{
  "asyCode": "draw(unitsquare); fill(unitsquare, lightblue);",
  "outputParams": {
    "format": "png",
    "renderLevel": 4
  }
}

Примечания по совместимости клиента:

  • Некоторые клиенты MCP могут иметь ограничения по поддерживаемым типам MIME изображений.

  • Например, если вы используете этот сервер с клиентом, который не поддерживает image/svg+xml (например, определенные версии или конфигурации "Cherry Studio", как сообщалось), убедитесь, что вы запрашиваете формат png , включив "outputParams": { "format": "png" } в аргументы вызова инструмента. Сервер по умолчанию использует svg , если формат не указан.

Автор

luorivergoddess

Лицензия

МСК

Available Tools

1 tool
renderGeometricImageB

Renders an image from Asymptote code.

ParametersJSON Schema
NameRequiredDescriptionDefault
asyCodeYesA 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.
outputParamsNoOptional parameters to control the output image.

TDQS

B3.3/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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. 1 tool update
    • First observedrenderGeometricImage

TDQS

B3.3/5.0

Scored across 1 tool

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness1/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers