Freshdesk MCP Server

Freshdesk MCP Server

Enables interaction with Freshdesk API v2 to manage support tickets, contacts, agents, companies, and conversations with built-in authentication, rate limiting, and error handling.

Category
访问服务器

README

Freshdesk MCP Server

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
  • Rate Limiting: Automatic rate limit handling with configurable limits
  • Error Handling: Comprehensive error handling with retry logic
  • Type Safety: Full TypeScript implementation with strict typing
  • Logging: Structured logging with Pino
  • Enhanced Server Option: Advanced server with permission discovery and tool management (see ENHANCED_SERVER.md)

Installation

npm install
npm run build

Configuration

Create a .env file in the project root with the following variables:

# Required
FRESHDESK_DOMAIN=yourcompany.freshdesk.com  # or just "yourcompany"
FRESHDESK_API_KEY=your_api_key_here

# Optional
FRESHDESK_MAX_RETRIES=3          # Maximum retry attempts (default: 3)
FRESHDESK_TIMEOUT=30000          # Request timeout in ms (default: 30000)
FRESHDESK_RATE_LIMIT=50          # Rate limit per minute (default: 50)
LOG_LEVEL=info                   # Log level: debug, info, warn, error

Usage

Starting the Server

# Development mode with auto-reload
npm run dev

# Production mode
npm start

MCP Client Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "freshdesk": {
      "command": "node",
      "args": ["/path/to/freshdesk-mcp/dist/index.js"],
      "env": {
        "FRESHDESK_DOMAIN": "yourcompany.freshdesk.com",
        "FRESHDESK_API_KEY": "your_api_key_here"
      }
    }
  }
}

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

Example Usage

Create a Ticket

{
  "tool": "tickets_manage",
  "arguments": {
    "action": "create",
    "params": {
      "subject": "Need help with login",
      "description": "I cannot log into my account",
      "email": "customer@example.com",
      "priority": 2,
      "status": 2,
      "tags": ["login", "urgent"]
    }
  }
}

Search Contacts

{
  "tool": "contacts_manage",
  "arguments": {
    "action": "search",
    "params": {
      "query": "john@example.com",
      "page": 1,
      "per_page": 10
    }
  }
}

Add Reply to Ticket

{
  "tool": "conversations_manage",
  "arguments": {
    "action": "create_reply",
    "params": {
      "ticket_id": 12345,
      "body": "<p>Thank you for contacting us. We'll help you resolve this issue.</p>"
    }
  }
}

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

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选