使用说明
SupaUI MCP Server
A Model Context Protocol (MCP) server for SupaUI that enables AI agents to fetch and browse UI components from buouui.com and to generate images through natural language interactions.
Features
- Fetch UI Components: Search buouui.com and get a component's source code together with the npm packages and other components it needs
- List UI Components: Browse the available components, optionally filtered by keyword
- Create Images: Generate or edit an image and get its URL
- TypeScript Support: Built with TypeScript for better type safety and developer experience
Prerequisites
Smithery
use Smithery to install supaui-mcp in Claude:
npx -y @smithery/cli install @buoooou/supaui-mcp --client claude
munal
- clone repo:
git clone [your-repository-url]
cd mcp-ui-gen
- Node.js (Latest LTS version)
- BUOU_API_KEY from buouui.com
Installation
# Install dependencies
pnpm install
# Build the project
pnpm build
Configuration
- Set your BUOU_API_KEY in the environment:
export BUOU_API_KEY=your_api_key_here
- Or create a configuration file based on smithery.yaml requirements.
Usage
Starting the Server
pnpm start
Available Commands
The server supports the following commands:
- Fetch UI Component:
/ui fetch modern login form
- List UI Components:
/buou list cards
- Create Image:
/image a minimal logo for a coffee shop
API Tools
FetchUiTool (fetch-ui)
- Input:
searchQuery - Returns the best matching component: its files, the npm packages to install, the
@/components/uicomponents it imports, and other close matches - Endpoint:
/api/fetch
ListUiTool (list-ui)
- Input:
searchQuery(optional) - Lists component names, filtered by the keyword when one is given
- Endpoint:
/api/list
CreateImageTool (create-image)
- Input:
message,image - Returns the URL of the generated image
- Endpoint:
/api/image
Development
# Build in watch mode
pnpm exec tsc -w
Environment Variables
BUOU_API_KEY: Your API key from buouui.com (Required)BUOU_API_URL: Base URL of the API, defaults tohttps://buouui.com. Point it tohttp://localhost:3000to develop against a local site
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
ISC
Support
For support, please visit:
- buouui.com
- Email: support@buouui.com
