Magic UI Components
STDIOMCP server for accessing and exploring Magic UI components from magicuidesign repository.
MCP server for accessing and exploring Magic UI components from magicuidesign repository.
An MCP (Model Context Protocol) server for accessing and exploring Magic UI components from the magicuidesign/magicui repository.
MCP Magic UI is a server that implements the Model Context Protocol (MCP) to provide access to Magic UI components. It fetches component data from the Magic UI GitHub repository, categorizes them, and makes them available through an MCP API. This allows AI assistants and other MCP clients to easily discover and use Magic UI components in their applications.
# Clone the repository git clone https://github.com/idcdev/mcp-magic-ui.git cd mcp-magic-ui # Install dependencies npm install # Build the project npm run build
To avoid GitHub API rate limits, it's recommended to set up a GitHub personal access token:
.env
file in the project root (or copy from .env.example
).env
file:GITHUB_TOKEN=your_github_token_here
You can start the server using either stdio or HTTP transport:
# Using stdio transport (default) npm start # Using HTTP transport TRANSPORT_TYPE=http npm start
You can connect to the server using any MCP client. For example, using the MCP Inspector:
npx @modelcontextprotocol/inspector mcp-magic-ui
Or, if using HTTP transport:
npx @modelcontextprotocol/inspector http://localhost:3000
The server provides the following MCP tools:
get_all_components
- Get a list of all available Magic UI components with their metadataget_component_by_path
- Get the source code of a specific component by its file pathsrc/
- Source code
index.ts
- Main entry point for the servercli.ts
- Command-line interfaceserver.ts
- MCP server configuration and tool definitionsservices/
- Service modules
github.ts
- GitHub API interaction and cachingcomponent-parser.ts
- Component categorization and processingcache/
- Local cache for component data
dist/
- Compiled JavaScript code
Contributions are welcome! Here are some ways you can contribute:
MIT