Magic-MCP

yanndebray/Magic-MCP

3.2

If you are the rightful owner of Magic-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Magic-MCP is a server that exposes a magic square function as an MCP server, allowing clients to generate magic squares by interfacing with a remote MATLAB service.

Tools
1
Resources
0
Prompts
0

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.