YCloud WhatsApp API MCP Server that auto-generates MCP tools from YCloud’s OpenAPI spec so AI models can call the WhatsApp endpoints.
https://github.com/YCloud-Developers/ycloud-whatsapp-mcp-serverYou know the drill: new API integration means hours of writing wrapper functions, handling authentication, parsing responses, and dealing with parameter validation. What if your AI could just read the OpenAPI spec and start making calls directly?
That's exactly what the YCloud WhatsApp MCP server does. It dynamically generates MCP tools from YCloud's OpenAPI specification, giving Claude and other AI models direct access to WhatsApp Business API endpoints without you writing a single wrapper function.
Instead of spending your afternoon writing this:
async function sendWhatsAppMessage(phoneNumber: string, message: string) {
const response = await fetch('https://api.ycloud.com/v2/whatsapp/messages', {
method: 'POST',
headers: {
'X-API-Key': process.env.YCLOUD_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: phoneNumber,
type: 'text',
text: { body: message }
})
});
// Error handling, response parsing, etc...
}
Your AI can just do this:
Send a WhatsApp message to +1234567890 saying "Your order is ready for pickup"
The MCP server handles authentication, parameter validation, and response formatting automatically.
Here's where it gets interesting: the server reads YCloud's OpenAPI spec at runtime and generates MCP tools for every endpoint. New API features? They're immediately available to your AI without touching your code.
The server uses swagger-parser to introspect the OpenAPI specification and creates properly typed MCP tools with:
Customer Support Automation: "Check if this customer has any pending WhatsApp conversations and send them a follow-up about their support ticket"
Order Management: "When an order status changes to 'shipped', send a WhatsApp message with tracking info to the customer"
Lead Qualification: "Send a WhatsApp message to new leads from our landing page asking about their project timeline"
Appointment Reminders: "Send WhatsApp reminders to all customers with appointments tomorrow"
Add it to your Claude Desktop config:
{
"mcpServers": {
"ycloud-whatsapp": {
"command": "node",
"args": ["path/to/ycloud-whatsapp-mcp-server/build/index.js"],
"env": {
"API_BASE_URL": "https://api.ycloud.com/v2",
"API_HEADERS": "X-API-Key:your-api-key-here"
}
}
}
}
That's it. Claude now has access to the entire YCloud WhatsApp API surface area.
The architecture is clean TypeScript with proper error handling and type safety throughout. Environment variables handle configuration, Axios manages HTTP requests, and the MCP SDK provides the protocol implementation.
You get all the benefits of a well-architected API client without writing or maintaining any of the integration code. The server handles the tedious parts while you focus on business logic.
git clone https://github.com/YCloud-Developers/ycloud-whatsapp-mcp-server.git
cd ycloud-whatsapp-mcp-server
npm install && npm run build
# Set your YCloud API key and run
API_HEADERS="X-API-Key:your-key-here" npm start
Your AI can start sending WhatsApp messages within minutes. No wrapper functions, no manual API documentation reading, no parameter mapping – just natural language requests that get executed through properly authenticated API calls.
This is what API integration should look like in the AI era: describe what you want, and let the machine handle the implementation details.