A Model Context Protocol (MCP) server implementation for the Respond.io API, enabling seamless integration with AI assistants, automation tools, and Claude Desktop.
- ✅ Get, create, update, and delete contacts
- ✅ List contacts with filters and search
- ✅ Add and remove contact tags
- ✅ Update contact lifecycle stages
- ✅ List contact channels
- ✅ Send messages (text, attachments, WhatsApp templates, emails)
- ✅ Retrieve message details and status
- ✅ Support for multiple channel types
- ✅ Assign/unassign conversations to users
- ✅ Open and close conversations
- ✅ Add closing notes and summaries
- ✅ List users and get user details
- ✅ Manage custom fields
- ✅ List channels and closing notes
- ✅ Create and manage workspace tags
- ✅ Add internal comments to contacts
- ✅ Mention users in comments
- ✅ Can run as a local subprocess via stdio or as an HTTP server (
/mcpendpoint) - ✅ Health endpoint (
/health) for monitoring and uptime checks - ✅ CORS enabled for HTTP mode
- Node.js 18+
- npm / yarn / bun
- Git
# Clone the repository
git clone https://github.com/respond-io/mcp-server.git
cd mcp-server
# Install dependencies
npm install
# Build the project
npm run buildThe server is configured using environment variables. Set them in your shell or deployment environment.
RESPONDIO_API_KEY: (Required) Your Respond.io API key.RESPONDIO_BASE_URL: The base URL for the Respond.io API (defaults tohttps://api.respond.io/v2).MCP_SERVER_MODE: The server mode, eitherstdioorhttp(defaults tostdio).PORT: The port for HTTP mode (defaults to3000).
You can use this server with Claude Desktop in either STDIO (local subprocess) or HTTP (hosted or local HTTP server) mode.
Configure Claude Desktop (For Development Purpose):
{
"command": "node",
"args": [
"/<Your Local Folder Path>/dist/index.js"
],
"env": {
"RESPONDIO_API_KEY": "your_api_key",
"MCP_SERVER_MODE": "stdio"
}
}Configure Claude Desktop (For Production Usage):
{
"command": "npx",
"args": [
"@respond-io/mcp-server"
],
"env": {
"RESPONDIO_API_KEY": "your_api_key",
"MCP_SERVER_MODE": "stdio"
}
}- Launch Claude Desktop and add this MCP server.
- The server will start as a subprocess and communicate over stdio.
Test:
Try any MCP tool from Claude Desktop, e.g., get a contact or send a message.
Start the server in HTTP mode:
npm run start:httpor (if built):
export MCP_SERVER_MODE=http
node dist/index.jsConfigure Claude Desktop:
{
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:3000/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer your-token-here"
}
}Test HTTP health:
curl http://localhost:3000/health
# {"status":"ok"}Test HTTP MCP endpoint:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"list_tools","params":{}}'You should get a JSON list of available tools.
get_contact({ identifier: "id:12345" })
get_contact({ identifier: "email:user@example.com" })
get_contact({ identifier: "phone:+60123456789" })create_contact({
identifier: "phone:+60123456789",
firstName: "John",
lastName: "Doe",
email: "john.doe@example.com",
language: "en",
custom_fields: [
{ name: "Company", value: "Acme Corp" },
{ name: "Order Number", value: 12345 }
]
})list_contacts({
limit: 50,
search: "john@example.com",
timezone: "Asia/Kuala_Lumpur"
})add_contact_tags({
identifier: "id:12345",
tags: ["vip", "premium", "sales"]
})send_message({
identifier: "id:12345",
channelId: null, // Use last interacted channel
messageType: "text",
text: "Hello! Thank you for contacting us."
})send_message({
identifier: "phone:+60123456789",
channelId: 5678,
messageType: "whatsapp_template",
templateName: "order_confirmation",
templateLanguage: "en"
})send_message({
identifier: "email:user@example.com",
channelId: 1234,
messageType: "email",
text: "Your order has been shipped!",
subject: "Order Shipment Notification"
})send_message({
identifier: "id:12345",
channelId: 5678,
messageType: "attachment",
attachmentUrl: "https://example.com/invoice.pdf",
attachmentType: "file"
})assign_conversation({
identifier: "id:12345",
assignee: "123"
})
assign_conversation({
identifier: "id:12345",
assignee: "agent@example.com"
})
assign_conversation({
identifier: "id:12345",
assignee: "null"
})update_conversation_status({
identifier: "id:12345",
status: "close",
category: "Resolved",
summary: "Customer issue resolved successfully"
})create_comment({
identifier: "id:12345",
text: "Customer requested a callback tomorrow at 2 PM"
})
// Mention a user
create_comment({
identifier: "id:12345",
text: "{{@user.456}} please follow up with this customer"
})list_users({
limit: 20
})create_custom_field({
name: "Customer Tier",
slug: "customer_tier",
description: "Customer membership tier",
dataType: "list",
allowedValues: ["Bronze", "Silver", "Gold", "Platinum"]
})list_channels({
limit: 10
})get_contact- Retrieve contact informationcreate_contact- Create a new contactupdate_contact- Update contact informationdelete_contact- Delete a contactlist_contacts- List all contacts with filtersadd_contact_tags- Add tags to a contactremove_contact_tags- Remove tags from a contact
send_message- Send messages (text, attachment, template, email)get_message- Retrieve message details
assign_conversation- Assign/unassign conversationsupdate_conversation_status- Open/close conversations
create_comment- Add internal comments
list_users- List workspace usersget_user- Get user detailslist_custom_fields- List custom fieldscreate_custom_field- Create custom fieldslist_channels- List messaging channelslist_closing_notes- List closing note categories
mcp-server/
├── src/
│ ├── index.ts # Main server implementation
│ ├── middlewares/ # Express middlewares
│ ├── utils/ # Utility functions
│ └── tools/ # Tool definitions
├── dist/ # Compiled JavaScript output
├── .env.example # Environment variable template
├── .eslintrc.json # ESLint configuration
├── .prettierrc.json # Prettier configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies
└── README.md # Documentation
# Run in development mode with auto-reload
npm run dev
# Build the project
npm run build
# Run linter
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run format
# Type check
npm run type-check- ✅ TypeScript - Full type safety
- ✅ ESLint - Code quality and consistency
- ✅ Prettier - Code formatting
- ✅ Strict Mode - TypeScript strict mode enabled
- ✅ Error Handling - Comprehensive error handling
- ✅ Modular Design - Clean separation of concerns
The Respond.io API has rate limits. The server handles rate limit errors and includes rate limit information in error responses:
Retry-After- Seconds until retry is allowedX-RateLimit-Limit- Request limit for the endpointX-RateLimit-Remaining- Remaining requests
The server provides detailed error messages:
// API errors include status codes and messages
{
"error": "API Error 404: Contact not found"
}
// Network errors
{
"error": "Network Error: timeout of 30000ms exceeded"
}
// Validation errors
{
"error": "API Error 400: Validation error."
}- Never commit API keys - Use environment variables
- Use HTTPS - All API calls use secure connections
- Validate input - All inputs are validated before API calls
- Error sanitization - Sensitive information is not exposed in errors
Contributions are welcome! Please follow these guidelines:
- 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
- Follow TypeScript best practices
- Use meaningful variable and function names
- Add comments for complex logic
- Ensure all tests pass
- Run linter before committing
- Check that your API key is correct in
.env - Ensure the API key has the necessary permissions
- Verify the contact identifier format (
id:123,email:user@example.com,phone:+60123456789) - Check that the contact exists in your workspace
- Wait for the time specified in the
Retry-Afterheader - Consider implementing exponential backoff for retries
- Run
npm installto ensure all dependencies are installed - Delete
node_modulesanddistfolders, then reinstall
- Ensure you are using a supported TypeScript version (recommended:
5.3.x) - If you see warnings about
any, useRecord<string, unknown>or define explicit interfaces
- Ensure the MCP server is running in HTTP mode (
MCP_SERVER_MODE=http) - Check the correct port (
PORT) is open and matches your configuration - Use
curl http://localhost:3000/healthto test
MIT License - see LICENSE file for details
For issues and questions:
- GitHub Issues: [Create an issue]
- Respond.io API Documentation: https://docs.respond.io
- Respond.io Support: https://support.respond.io
- Initial release
- Full support for Contact, Messaging, Conversation, Comment, and Space APIs
- Comprehensive error handling
- TypeScript with strict mode
- MCP SDK integration
- HTTP and STDIO dual-mode support
- Health endpoint for monitoring
- Built with Model Context Protocol SDK
- Powered by Respond.io API
Made with ❤️ for seamless customer engagement automation