This guide provides step-by-step instructions for installing and setting up the Frontapp MCP integration.
Before you begin, ensure you have the following:
- Node.js (v16 or later)
- npm (v7 or later)
- A Frontapp account with API access
- A Frontapp API key
git clone https://github.com/zqushair/Frontapp-MCP.git
cd Frontapp-MCP
npm install
Create a .env
file in the root directory of the project based on the provided .env.example
file:
cp .env.example .env
Open the .env
file and update the following variables:
# Frontapp API credentials
FRONTAPP_API_KEY=your_frontapp_api_key_here
# Webhook configuration
WEBHOOK_SECRET=your_webhook_secret_here
WEBHOOK_BASE_URL=https://your-webhook-url.com
# Server configuration
PORT=3000
# Logging and Monitoring
LOG_LEVEL=info
METRICS_INTERVAL=60000
# API Gateway configuration
API_KEY=your_api_key_here
CORS_ORIGINS=*
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=100
FRONTAPP_API_KEY
: Your Frontapp API key. You can obtain this from the Frontapp developer settings.WEBHOOK_SECRET
: A secret string used to verify webhook signatures. Generate a random string for this.WEBHOOK_BASE_URL
: The publicly accessible URL where your webhook server will be hosted.PORT
: The port on which the webhook server will run.LOG_LEVEL
: The logging level (e.g., debug, info, warn, error).METRICS_INTERVAL
: How often to log metrics in milliseconds (default: 60000).API_KEY
: API key for authenticating requests to the API Gateway. Generate a random string for this.CORS_ORIGINS
: Comma-separated list of allowed origins for CORS (default:*
).RATE_LIMIT_WINDOW_MS
: Time window for rate limiting in milliseconds (default: 900000 - 15 minutes).RATE_LIMIT_MAX
: Maximum number of requests per window (default: 100).
npm run build
This will compile the TypeScript code into JavaScript in the dist
directory.
npm start
This will start the MCP server and the webhook server.
To verify that the installation was successful, you should see the following output when starting the server:
Starting Frontapp MCP server...
Request handlers set up successfully
Frontapp MCP server connected to transport
Webhook handlers set up successfully
Webhook server listening on port 3000
Webhook URL: http://localhost:3000/webhooks
You can run the provided test scripts to verify that the integration is working correctly:
# Test the API client
npm run test:api
# Test conversation handlers
npm run test:conversations
# Test tag handlers
npm run test:tags
# Test contact handlers
npm run test:contacts
# Test webhook functionality
npm run test:webhooks
If you encounter authentication errors when connecting to the Frontapp API, verify that your API key is correct and has the necessary permissions.
If webhooks are not being received:
- Ensure that your webhook URL is publicly accessible.
- Verify that the webhook secret is correctly configured.
- Check that you have subscribed to the relevant webhook events in Frontapp.
If you encounter build errors:
- Ensure that you have the correct version of Node.js and npm installed.
- Try deleting the
node_modules
directory and thepackage-lock.json
file, then runnpm install
again. - Check for TypeScript errors in your code.
Once you have successfully installed and configured the Frontapp MCP integration, you can:
- Explore the API Reference to learn about the available endpoints.
- Set up Webhook Integration for real-time updates.
- Integrate the MCP server with your LLM application.
For more information, refer to the Development Guide.