Magic API
Magic-API MCP Server - A Model Context Protocol server for Magic-API development
What is Magic API?
Magic API is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to magic-api mcp server - a model context protocol server for magic-api development
Magic-API MCP Server - A Model Context Protocol server for Magic-API development
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Magic-API MCP Server - A Model Context Protocol server for M
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx magic-apiConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Magic API
The Magic-API MCP Server connects Claude and other MCP-compatible AI assistants to a running Magic-API instance, exposing over 12 categories of tools for API development, resource management, debugging, and documentation retrieval. Magic-API is a low-code platform for building HTTP APIs using its own scripting language (Magic-Script), and this MCP server lets you create, test, debug, and manage those APIs entirely through natural language. It supports breakpoint debugging over WebSocket, backup and rollback, Java class introspection for extensions, and multiple preset tool compositions for different workflows.
Prerequisites
- Python 3.9 or later with pip or uv installed
- A running Magic-API instance (default: http://127.0.0.1:10712)
- Magic-API credentials if authentication is enabled (username/password or token)
- An MCP client such as Claude Desktop or Claude Code
- Google Gemini API key if you plan to use the smart_extract / AI-assisted tools
Install the Magic-API MCP server
Install the package using pip or uvx. The uvx method is recommended as it always fetches the latest published version without polluting your global Python environment.
# Recommended: uvx (no install step needed, runs latest)
uvx magic-api-mcp-server@latest --transport stdio
# Or install permanently with pip
pip install magic-api-mcp-serverConfigure environment variables
Set the environment variables that point the MCP server at your Magic-API instance. At minimum you need MAGIC_API_BASE_URL. Add credentials if your instance has auth enabled.
export MAGIC_API_BASE_URL=http://127.0.0.1:10712
export MAGIC_API_USERNAME=admin
export MAGIC_API_PASSWORD=yourpassword
export MAGIC_API_AUTH_ENABLED=true
export MAGIC_API_TIMEOUT_SECONDS=30Choose a tool composition mode
The server supports preset tool combinations to limit which tools are loaded. Use 'full' for all tools, 'development' for API creation and debugging, 'production' for resource management, or 'minimal' for essential tools only.
# Full mode (default)
uvx magic-api-mcp-server@latest --transport stdio --composition full
# Development mode (API creation + debugging)
uvx magic-api-mcp-server@latest --transport stdio --composition development
# Minimal mode
uvx magic-api-mcp-server@latest --transport stdio --composition minimalConfigure your MCP client
Add the server to your MCP client configuration. Pass environment variables directly in the config for credentials and connection settings.
{
"mcpServers": {
"magic-api": {
"command": "uvx",
"args": ["magic-api-mcp-server@latest", "--transport", "stdio"],
"env": {
"MAGIC_API_BASE_URL": "http://127.0.0.1:10712",
"MAGIC_API_USERNAME": "admin",
"MAGIC_API_PASSWORD": "yourpassword",
"MAGIC_API_AUTH_ENABLED": "true"
},
"timeout": 600
}
}
}Retrieve Magic-Script syntax before writing code
Magic-Script has unique syntax that differs from standard JavaScript. Always invoke the syntax retrieval tool first before asking the AI to write any Magic-Script code to ensure accuracy.
# In Claude, prompt:
# "Call get_full_magic_script_syntax so we have the language reference before writing any scripts"Magic API Examples
Client configuration
Claude Desktop configuration using uvx to run the Magic-API MCP server with authentication enabled.
{
"mcpServers": {
"magic-api": {
"command": "uvx",
"args": ["magic-api-mcp-server@latest", "--transport", "stdio"],
"env": {
"MAGIC_API_BASE_URL": "http://127.0.0.1:10712",
"MAGIC_API_USERNAME": "admin",
"MAGIC_API_PASSWORD": "yourpassword",
"MAGIC_API_AUTH_ENABLED": "true",
"MAGIC_API_TIMEOUT_SECONDS": "30"
},
"timeout": 600
}
}
}Prompts to try
These prompts cover the main tool categories: API creation, querying, debugging, and resource management.
- "Show me all available APIs and their endpoints"
- "Create a new GET API at /api/users that returns a list of users from the database"
- "Set a breakpoint on the /api/orders endpoint and debug the last request"
- "Create a backup snapshot of the current API configuration"
- "Search for all APIs that contain TODO comments"Troubleshooting Magic API
Connection refused when the server tries to reach Magic-API
Verify Magic-API is running and accessible at the URL set in MAGIC_API_BASE_URL. Test with `curl http://127.0.0.1:10712/magic/web/api` to confirm the service is up.
Authentication errors (401 or 403) when calling tools
Set MAGIC_API_AUTH_ENABLED=true and provide valid MAGIC_API_USERNAME and MAGIC_API_PASSWORD. Alternatively, generate a token in the Magic-API dashboard and set MAGIC_API_TOKEN instead of username/password.
Magic-Script code generated by Claude has syntax errors
Before asking Claude to write any Magic-Script, first prompt it to call the `get_full_magic_script_syntax` tool. Magic-Script has unique syntax distinct from standard JavaScript and the model needs this reference to generate valid code.
Frequently Asked Questions about Magic API
What is Magic API?
Magic API is a Model Context Protocol (MCP) server that magic-api mcp server - a model context protocol server for magic-api development It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Magic API?
Follow the installation instructions on the Magic API GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Magic API?
Magic API works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Magic API free to use?
Yes, Magic API is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Magic API Alternatives — Similar Developer Tools Servers
Looking for alternatives to Magic API? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Magic API in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Magic API?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.