🚀 Turn Any API into a Conversational AI Powerhouse
Transform your REST APIs into intelligent, chat-driven MCP servers with zero code changes
🎯 Quick Start • 📖 Documentation • ✨ Features • 🎨 Demo
🎬 What is MCPHy?
MCPHy is a revolutionary CLI tool and Node.js library that bridges the gap between traditional REST APIs and conversational AI. Simply point it at your Swagger/OpenAPI specification, and watch your API transform into an intelligent Model Context Protocol (MCP) server with natural language understanding.
TL;DR: Feed it an API spec → Get a conversational AI interface. Ask questions in plain English → Get precise API calls.
🎯 Now ask questions like: "Get all users created after January 1st" "Create a new product with name and price" "Delete order with ID abc-123"
🌟 What Makes MCPHy Special?
🧠 AI-Powered Intelligence
Natural language → API endpoints Powered by GPT-4-mini with fallback support
💬 Beautiful Web Chat
Sleek, responsive browser interface Real-time query processing & results
⚡ Zero Configuration
Auto-detects API specs Interactive CLI prompts
🔌 Plug & Play
Works with existing APIs No code changes required
🎯 Intelligent Matching
Parameter extraction Confidence scoring & reasoning
📦 Export Ready
Standalone packages Multi-platform deployment
🎯 Quick Start
📥 Installation
🚀 Three Steps to AI-Powered APIs
Step 1️⃣: Initialize
MCPHy will:
🔍 Auto-detect your API spec (
swagger.yaml
,openapi.json
, etc.)✅ Validate the specification
📝 Generate MCP manifest
⚙️ Create
.mcphy.json
config
Step 2️⃣: Add OpenAI Key (Optional)
For AI-powered query matching, add your OpenAI API key:
No OpenAI key? No problem! MCPHy falls back to keyword-based matching.
Step 3️⃣: Launch
🎉 That's It! Your API is now conversational!
🎨 Try It Now
Open http://localhost:3000
and start chatting with your API:
💡 Sample Queries to Try:
Query | What It Does |
| Retrieves filtered users |
| POST request with params |
| PUT/PATCH request |
| DELETE request |
🛠️ CLI Commands
🎬 mcphy init
Initialize a new MCPHy project
Example:
🚀 mcphy serve
Start the MCP server
Example:
Available Endpoints:
Endpoint | Description |
| 💬 Web Chat Interface |
| 📋 MCP Manifest |
| 🧠 Query Endpoint (GET/POST) |
| ℹ️ API Information |
| 📚 List All Endpoints |
| ❤️ Health Check |
✅ mcphy validate
Validate an API specification
Example:
📦 mcphy export
Export as a standalone package
Example:
What's Included:
✅ Complete MCPHy runtime
✅ Your API spec & config
✅ Startup scripts (
.sh
+.bat
)✅ Custom README
✅ Package.json
🔥 Advanced Usage
💻 Programmatic API
Use MCPHy as a library in your Node.js projects:
🌐 Query API via REST
Using cURL (POST):
Using cURL (GET):
Response:
🧪 Test with Sample API
MCPHy includes a sample Pet Store API:
Visit http://localhost:3000
and try queries like:
"Show me all available pets"
"Create a new pet"
"Get pet by ID 123"
⚙️ Configuration
📄 .mcphy.json
🔑 Environment Variables
Create a .env
file:
Get an OpenAI key: platform.openai.com/api-keys
🏗️ Project Structure
🛠️ Development
Build from Source
Available Scripts
Script | Description |
| Compile TypeScript + copy UI files |
| Copy UI assets to dist |
| Watch mode for development |
| Run compiled server |
| Export standalone package |
🧠 How Natural Language Matching Works
MCPHy uses a two-tier intelligent matching system:
🤖 Tier 1: AI-Powered (with OpenAI)
Uses GPT-4-mini for semantic understanding
Extracts intent, method, parameters from natural language
Returns confidence scores and reasoning
🔍 Tier 2: Keyword Fallback (no API key needed)
Pattern matching on endpoint paths
Keyword extraction from descriptions
Basic parameter inference
Example Flow:
📊 Supported Specifications
Format | Status | Notes |
OpenAPI 3.0+ | ✅ Fully Supported | All features available |
Swagger 2.0 | ✅ Fully Supported | Complete compatibility |
Postman Collections | ⏳ Coming Soon | In development |
GraphQL Schemas | 📋 Planned | On roadmap |
🗺️ Roadmap
🧠 Natural language query matching
💬 Interactive web chat interface
🔍 Auto-detect API specifications
🤖 OpenAI GPT-4-mini integration
📦 Standalone export functionality
🔌 Full API request proxying
🔐 Authentication/authorization middleware
📮 Postman collection support
🎨 GraphQL schema support
🧩 Custom middleware plugins
🐳 Docker deployment templates
📊 Analytics & usage tracking
🌍 Multi-language support
🤝 Contributing
We welcome contributions! Here's how you can help:
🍴 Fork the repository
🌿 Create a 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
Development Guidelines
✅ Write TypeScript with strict mode
✅ Add tests for new features
✅ Update documentation
✅ Follow existing code style
📋 Requirements
Requirement | Version |
Node.js | >= 18.0.0 |
npm | >= 9.0.0 |
TypeScript | >= 5.0.0 (dev only) |
🎓 Use Cases
🚀 For API Developers
Rapid prototyping & testing
Interactive API documentation
Developer experience enhancement
🤖 For AI Integration
Voice assistant backends
Chatbot API interfaces
Conversational automation
📚 For Documentation
Living API examples
Interactive tutorials
User-friendly demos
🧪 For Testing
Natural language test cases
QA automation
Exploratory testing
🎁 Example Projects
Check out these examples to get started:
Want to see your project here? Submit a PR!
❓ FAQ
No! MCPHy works without an OpenAI key using keyword-based fallback matching. However, for best results, we recommend using GPT-4-mini for intelligent query understanding.
MCPHy is currently in active development (v0.1.0). It's great for development, testing, and prototyping. For production use, we recommend waiting for v1.0.0 or implementing additional security measures.
Not yet! GraphQL support is on our roadmap. Currently, MCPHy supports REST APIs via Swagger/OpenAPI specifications.
Yes! The UI files are located in src/server/ui/
. You can modify index.html
, script.js
, and style.css
to customize the look and feel.
With OpenAI: ~85-95% accuracy depending on query complexity Without OpenAI: ~60-75% accuracy using keyword matching
📜 License
MIT © 2025 MCPHy
💖 Support
Love MCPHy? Here's how you can help:
⭐ Star this repository
🐛 Report bugs via GitHub Issues
💡 Suggest features
📣 Share with your network
🤝 Contribute code
🚀 Ready to Make Your APIs Conversational?
Get Started • View Examples • Read Docs • Report Issues
Made with ❤️ by developers, for developers
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Transform REST APIs into intelligent, chat-driven MCP servers with zero code changes. Simply point it at your Swagger/OpenAPI specification to get natural language querying capabilities powered by AI.
- 🎬 What is MCPHy?
- 🌟 What Makes MCPHy Special?
- 🎯 Quick Start
- 🎨 Try It Now
- 🛠️ CLI Commands
- 🔥 Advanced Usage
- ⚙️ Configuration
- 🏗️ Project Structure
- 🛠️ Development
- 🧠 How Natural Language Matching Works
- 📊 Supported Specifications
- 🗺️ Roadmap
- 🤝 Contributing
- 📋 Requirements
- 🎓 Use Cases
- 🎁 Example Projects
- ❓ FAQ
- 📜 License
- 💖 Support