API Creator MCP
Generates complete, production-ready REST, GraphQL, and microservice APIs with built-in security, validation, and deployment configurations.
README
"# ๐ API Creator MCP
API Creator MCP is a specialized MCP (Model Context Protocol) server that generates complete, production-ready APIs. It supports REST, GraphQL, and microservices architectures with built-in security, validation, and deployment configurations.
โจ Features
- REST API Generation - Express/Fastify with database integration
- OpenAPI Conversion - Transform OpenAPI specs into working servers
- GraphQL API Generation - Apollo Server with subscriptions support
- Microservice Generation - gRPC, Kafka, RabbitMQ with service discovery
- Deployment Configuration - Docker, Kubernetes, AWS Lambda, Vercel
- Security First - JWT auth, Zod validation, rate limiting, path sanitization
- TypeScript Native - Full type safety with strict TypeScript
- Observability - OpenTelemetry tracing and Prometheus metrics
๐ Prerequisites
- Node.js 20+
- npm 9+
๐ Installation
Via npx (recommended)
npx api-creator-mcp
Via npm global install
npm install -g api-creator-mcp
api-creator-mcp
Via GitHub
git clone https://github.com/yourusername/api-creator-mcp.git
cd api-creator-mcp
npm install
npm run build
npm link
api-creator-mcp
๐ง Configuration for Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"api-creator-mcp": {
"command": "npx",
"args": ["-y", "api-creator-mcp"]
}
}
}
๐ง Configuration for Cursor
Add to your Cursor MCP configuration:
{
"mcpServers": {
"api-creator-mcp": {
"command": "npx",
"args": ["-y", "api-creator-mcp"]
}
}
}
๐ ๏ธ Available Tools
1. create_rest_api
Generate a complete REST API with Express/Fastify.
{
"name": "tasks-api",
"endpoints": [
{ "path": "/tasks", "method": "GET", "description": "List all tasks" },
{ "path": "/tasks", "method": "POST", "description": "Create a task" },
{ "path": "/tasks/:id", "method": "DELETE", "description": "Delete a task" }
],
"database": "postgres",
"authentication": true,
"validation": true
}
2. generate_from_openapi
Convert an OpenAPI specification into a working server.
{
"openapi_spec": "{\"openapi\":\"3.0.0\",...}",
"output_language": "typescript",
"generate_sdk": true
}
3. create_graphql_api
Generate a GraphQL API with Apollo Server.
{
"name": "blog-api",
"schema": {
"types": "type Post { id: ID! title: String! content: String! }",
"queries": "posts: [Post]",
"mutations": "createPost(title: String!, content: String!): Post"
},
"data_source": "postgres",
"subscriptions": true
}
4. create_microservice
Generate a microservice with async communication.
{
"name": "order-service",
"communication": "kafka",
"service_discovery": "consul",
"observability": true
}
5. deploy_api
Deploy a generated API to cloud platforms.
{
"api_path": "./generated-apis/tasks-api",
"platform": "docker",
"environment": {
"NODE_ENV": "production",
"PORT": "3000"
}
}
๐ Usage Examples
Creating a Task Management API
# The MCP server will generate:
# - Express server with TypeScript
# - PostgreSQL integration with Prisma
# - JWT authentication
# - Zod validation for all endpoints
# - Complete project structure
Converting an Existing API
# Provide your OpenAPI 3.0 spec
# The server will generate:
# - Fully typed TypeScript server
# - Client SDK for easy integration
# - All endpoints from your spec
๐ Security
- Input Validation: All parameters validated with Zod schemas
- Rate Limiting: 100 requests per minute per client
- Path Sanitization: Prevents path traversal attacks
- Permission System: Role-based access control
- No eval/exec: Safe template literals only
- JWT Authentication: Built-in auth middleware
๐ Project Structure
api-creator-mcp/
โโโ src/
โ โโโ core/ # MCP server core
โ โโโ tools/ # Tool implementations
โ โโโ types/ # TypeScript types and Zod schemas
โ โโโ utils/ # Security and validation utilities
โโโ tests/
โ โโโ unit/ # Unit tests
โ โโโ integration/ # Integration tests
โโโ templates/ # API templates
โโโ docs/ # Documentation
๐งช Testing
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Watch mode
npm run test:watch
๐ค Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions"
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.