Skip to main content
Glama

Magic-MCP

by yanndebray
README.md1.27 kB
# Magic-MCP Magic square function exposed as MCP server 🪄✨ ![claude](img/claude.png) ## Getting started 1. Create a virtual environment and install the dependencies: ```bash python -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` 2. Run the MCP server: ```bash 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`. 4. 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`. 3. 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.

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