Labsco
Enreign logo

Freshdesk MCP Server

β˜… 11

from Enreign

An MCP server for interacting with the Freshdesk API v2, enabling management of customer support tickets and contacts.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

Freshdesk MCP Server

CI

A Model Context Protocol (MCP) server implementation for Freshdesk API v2 integration. This server provides tools for managing tickets, contacts, agents, companies, and conversations through the MCP interface.

Features

  • Complete Freshdesk API v2 Integration: Full support for core Freshdesk resources
  • Built-in Authentication: Secure API key-based authentication with input validation
  • Rate Limiting: Automatic rate limit handling with configurable limits
  • Error Handling: Comprehensive error handling with retry logic and exponential backoff
  • Type Safety: Full TypeScript implementation with strict typing
  • Logging: Structured logging with Pino
  • Security: Input validation, injection prevention, and authentication security tests

Available Tools

1. tickets_manage

Manage Freshdesk tickets - create, update, list, get, delete, and search tickets.

Actions:

  • create: Create a new ticket
  • update: Update an existing ticket
  • list: List tickets with filters
  • get: Get a specific ticket
  • delete: Delete a ticket
  • search: Search tickets with query

2. contacts_manage

Manage Freshdesk contacts - create, update, list, get, delete, search, and merge contacts.

Actions:

  • create: Create a new contact
  • update: Update an existing contact
  • list: List contacts with filters
  • get: Get a specific contact
  • delete: Delete a contact
  • search: Search contacts
  • merge: Merge multiple contacts

3. agents_manage

Manage Freshdesk agents - list, get, update agents, and view their groups and roles.

Actions:

  • list: List all agents
  • get: Get a specific agent
  • update: Update agent details
  • get_current: Get current authenticated agent
  • list_groups: List agent's groups
  • list_roles: List agent's roles

4. companies_manage

Manage Freshdesk companies - create, update, list, get, delete, search companies, and list company contacts.

Actions:

  • create: Create a new company
  • update: Update an existing company
  • list: List companies
  • get: Get a specific company
  • delete: Delete a company
  • search: Search companies
  • list_contacts: List contacts in a company

5. conversations_manage

Manage Freshdesk ticket conversations - create replies and notes, list, get, update, and delete conversations.

Actions:

  • create_reply: Add a reply to a ticket
  • create_note: Add a note to a ticket
  • list: List ticket conversations
  • get: Get a specific conversation
  • update: Update a conversation
  • delete: Delete a conversation

Development

Running Tests

npm test
npm run test:watch
npm run test:coverage

Linting and Formatting

npm run lint
npm run lint:fix
npm run format
npm run format:check

Type Checking

npm run typecheck

Architecture

src/
β”œβ”€β”€ api/          # API client implementation
β”œβ”€β”€ auth/         # Authentication logic
β”œβ”€β”€ core/         # Core types and interfaces
β”œβ”€β”€ tools/        # MCP tool implementations
β”œβ”€β”€ utils/        # Utility functions (logging, errors, rate limiting)
└── index.ts      # Main server entry point

Error Handling

The server implements comprehensive error handling:

  • Network Errors: Automatic retry with exponential backoff
  • Rate Limiting: Respects Freshdesk API rate limits with automatic throttling
  • Authentication Errors: Clear error messages for invalid API keys
  • Validation Errors: Input validation with detailed error messages
  • API Errors: Proper error mapping from Freshdesk API responses

Security

  • API keys are never logged or exposed
  • All inputs are validated using Zod schemas
  • Secure HTTPS connections to Freshdesk API
  • Environment-based configuration