Skip to main content
Glama

MCPHy

by sehmim
EXAMPLES.mdโ€ข2.48 kB
# Examples Real-world examples of MCPhy in action. ## Pet Store API ```bash # Use the included example cd examples mcphy init -f sample-swagger.yaml mcphy serve ``` Try these queries: - "Show me all pets" - "Create a new pet named Max" - "Get pet with ID 1" - "Delete pet 2" ## E-commerce API ```bash # Initialize with your API mcphy init -f ecommerce-api.yaml mcphy serve ``` Example queries: - "Get all products under $50" - "Create order for customer john@example.com" - "Update product 123 with new price 29.99" - "Get orders for last 30 days" ## Booking System ```bash mcphy init -f booking-api.yaml mcphy serve ``` Example queries: - "Create booking for John Doe for oil change for 2025-01-15" - "Get all bookings for garage way/123456" - "Update booking status to confirmed" - "Cancel booking with ID booking-123" ## What Makes These Examples Interesting ### ๐Ÿง  **Smart Parameter Extraction** MCPhy understands natural language and extracts structured data: ``` "Create booking for John Doe for oil change for 2025-01-15" โ†“ { "customer_name": "John Doe", "service_type": "oil change", "appointment_date": "2025-01-15" } ``` ### โš ๏ธ **Missing Information Detection** When you ask incomplete questions, MCPhy helps: ``` You: "create booking" MCPhy: โš ๏ธ Missing required fields: โ€ข garage_id (e.g., "for garage way/123456") โ€ข customer_name (e.g., "for John Doe") โ€ข service_type (e.g., "for oil change") โ€ข appointment_date (e.g., "for 2025-01-15") ``` ### ๐Ÿ”Œ **Real API Calls** MCPhy doesn't just match queries - it makes actual HTTP requests: ``` You: "get all users" MCPhy: ๐Ÿ“ค GET http://your-api.com/users ๐Ÿ“‹ Response: [{"id": 1, "name": "John"}, ...] ``` ## Try It Yourself 1. **Clone the repo:** ```bash git clone https://github.com/sehmim/mcphy.git cd mcphy ``` 2. **Install and run:** ```bash npm install npm run build npm link ``` 3. **Test with examples:** ```bash cd examples mcphy init -f sample-swagger.yaml mcphy serve ``` 4. **Open browser:** Visit `http://localhost:3000` and start chatting! ## Why Developers Love This - **Zero Code Changes** - Works with existing APIs - **Natural Language** - No need to remember endpoint names - **Real Responses** - Actually calls your backend - **Smart Guidance** - Helps when information is missing - **Beautiful UI** - Professional chat interface - **Easy Export** - Create standalone packages

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sehmim/mcphy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server