Skip to main content
Glama

Magic-MCP

by yanndebray

Magic-MCP

Magic square function exposed as MCP server 🪄✨

claude

Getting started

  1. Create a virtual environment and install the dependencies:

    python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
  2. Run the MCP server:

    python server.py

    The server exposes a single tool, generate_magic_square, which proxies a remote MATLAB service hosted at https://matlab-0j1h.onrender.com/mymagic/mymagic.

  3. Dependencies

    This project now uses requests and numpy to call and parse the remote MATLAB service. Ensure those packages are installed (they're included in requirements.txt). To change the target MATLAB service URL, edit the MATLAB_SERVICE_URL variable inside the calculate_magic_matrix tool in server.py.

  4. Connect an MCP-compatible client to the server (for example, via MCP discovery or by pointing the client at the stdio endpoint) and invoke the generate_magic_square tool. Provide the desired square size (and optionally set debug=true) to receive a structured response containing both the magic square and the raw metadata returned by the upstream service.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables generation of magic squares by exposing a single tool that connects to a remote MATLAB service. Users can specify the desired square size and receive structured magic square data with metadata.

  1. Getting started

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/yanndebray/Magic-MCP'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server