Daktela MCP Server¶
The Daktela MCP Server connects AI assistants (Claude Code, Claude Desktop, Cursor, and others) to your Daktela Contact Centre using the Model Context Protocol (MCP). It provides access to your contact centre data, enabling tasks like email quality audits, sales pipeline reviews, and call analysis β without writing any code.
Info
By default, the MCP server provides read-only access to your Daktela data. Write access can be enabled for specific roles, but only Daktela support can turn it on for your instance β see Write Access below.
There are two ways to use the Daktela MCP Server:
- Hosted (Built-in) β the MCP server runs as part of your Daktela instance. No installation required.
- Self-hosted β run the open-source PHP server yourself for custom deployments or cloud setups.
What is MCP?¶
The Model Context Protocol is an open standard that lets AI applications connect to external data sources and tools. By connecting to the Daktela MCP Server, your AI assistant gets structured access to your Daktela instance β enabling analysis and reporting tasks without any custom code.
Write Access¶
By default, the MCP server exposes read-only tools only β it cannot create or update any records. Read-only operations are always available and are never affected by write access.
Info
Write access is not self-service. To enable it, contact Daktela support and ask them to turn it on for your instance.
Once Daktela support has enabled write access, your Daktela administrator still needs to grant the MCP Write Access permission to the relevant role(s) under Manage β Users β Accesses β see Accesses. Disabled by default for every role β until it's granted, write operations are rejected with an insufficient-permissions error.
This applies to all MCP clients (Claude, Cursor, and any others).
Hosted (Built-in)¶
The hosted MCP server is built into your Daktela instance. No PHP, Docker, or Composer needed. Authentication is OAuth login only: you sign in through the regular Daktela login screen, and no token is ever generated, copied or stored in a config file.
Info
Only standard user (agent) accounts can connect. Admin-only accounts, customer portal (external) users and API users are rejected by the authorization flow.
Connecting your AI client¶
Your AI client must support remote MCP servers over HTTP with OAuth login. Claude, Cursor, VS Code and most current clients do.
- In your AI client, add the Daktela MCP server using its URL:
https://YOUR_DOMAIN/mcp-server/mcp. ReplaceYOUR_DOMAINwith your Daktela hostname (e.g.yourcompany.daktela.com). - The client detects that authentication is required and opens Daktela in your browser.
- If you are already logged in to Daktela in that browser, the connection completes immediately. Otherwise, log in with your usual Daktela credentials β password, MFA and SSO all work β and you are sent back to your client.
- Your AI client is now connected. You never see or handle a raw access token.
Info
Under the hood, this uses the standard OAuth 2.0 + PKCE authorization flow defined by the MCP specification, including dynamic client registration. The access token is scoped to your Daktela user and short-lived; your client renews it silently with a refresh token, so you are not asked to log in again while your Daktela session remains valid.
Tip
If your MCP client does not support OAuth-based remote connections, use the self-hosted server with an API access token instead. The hosted server does not accept static tokens or header-based authentication.
Claude Code¶
Add the server from the terminal:
or add it to your project's .mcp.json:
On first use, Claude Code opens the Daktela login in your browser. You can also start the login manually with the /mcp command.
Claude Desktop and claude.ai¶
Go to Settings β Connectors β Add custom connector, enter a name (e.g. Daktela) and the server URL, and click Connect. Daktela opens for you to log in.
Cursor¶
Open Cursor Settings β MCP β Add new MCP server, or add to .cursor/mcp.json:
Cursor shows a Needs login state next to the server; click it to log in to Daktela.
Other MCP clients¶
Any client that supports the MCP Streamable HTTP transport with OAuth can connect using:
- URL:
https://YOUR_DOMAIN/mcp-server/mcp - Authentication: OAuth 2.0 β the client discovers the login endpoints automatically from the server's protected-resource metadata.
Self-hosted (Advanced)¶
For custom or cloud deployments, you can run the MCP server yourself using the open-source PHP package.
- GitHub Repository: Daktela/daktela-v6-php-mcp-server
Requirements¶
- PHP 8.2 or higher
- Composer (PHP package manager)
- A Daktela instance with API read access
- An API Access Token from your Daktela account
Installation¶
-
Clone the repository:
-
Install dependencies:
Configuration¶
The server is configured using environment variables. Create a .env file based on the provided example, or pass the variables directly when running the server.
| Variable | Required | Default | Description |
|---|---|---|---|
DAKTELA_URL |
Yes | β | Your Daktela instance URL, e.g. https://your-instance.daktela.com |
DAKTELA_ACCESS_TOKEN |
Yes | β | API Access Token from your Daktela account |
CACHE_ENABLED |
No | true |
Enable caching of reference data (queues, users, statuses, etc.) |
CACHE_TTL_SECONDS |
No | 3600 |
Cache duration in seconds |
Tip
You can generate an API Access Token in your Daktela instance under Manage β Users β Edit user β Access Tokens.
Deployment Options¶
The self-hosted server supports two transport modes: stdio (for local AI desktop apps) and HTTP (for remote/cloud deployments).
Claude Desktop β Docker¶
This is the recommended approach for self-hosted. Build the Docker image and configure Claude Desktop to use it.
-
Build the image:
-
Add the following to your
claude_desktop_config.json:
Claude Desktop β Direct PHP¶
If you prefer to run PHP directly without Docker:
{
"mcpServers": {
"daktela": {
"command": "php",
"args": ["/path/to/daktela-v6-php-mcp-server/bin/server.php"],
"env": {
"DAKTELA_URL": "https://your-instance.daktela.com",
"DAKTELA_ACCESS_TOKEN": "your-api-token"
}
}
}
}
Docker β Standalone¶
Run the server as a standalone Docker container:
docker run -i --rm \
-e DAKTELA_URL=https://your-instance.daktela.com \
-e DAKTELA_ACCESS_TOKEN=your-api-token \
daktela-v6-php-mcp-server
HTTP Server Mode (Cloud Deployment)¶
For remote deployments such as Google Cloud Run, the server operates in HTTP mode where clients pass credentials via headers:
docker run --rm -p 8080:8080 \
-e DAKTELA_URL=https://your-instance.daktela.com \
-e DAKTELA_ACCESS_TOKEN=your-api-token \
daktela-v6-php-mcp-server php bin/http-server.php
Example cloud deployment with Google Cloud Run:
gcloud run deploy daktela-v6-php-mcp-server \
--source . \
--dockerfile Dockerfile.prod \
--region europe-west1 \
--allow-unauthenticated \
--memory 1Gi
Warning
When deploying to the cloud with --allow-unauthenticated, ensure you implement appropriate access controls to protect your Daktela data.
Available Tools¶
The MCP server exposes 81 tools organised into the following categories: 43 read-only and 38 write. Write-marked tools only work once Write Access is enabled β the global setting and the per-role permission must both be on. All list tools support pagination, sorting, and contextual filtering.
Info
There are no delete tools β the MCP server cannot remove records, even with Write Access enabled.
Tickets¶
| Tool | Access | Description |
|---|---|---|
count_tickets |
Read | Count tickets matching filter criteria |
get_ticket |
Read | Get a specific ticket by ID |
get_ticket_detail |
Read | Get detailed ticket information |
list_account_tickets |
Read | List tickets for a specific account |
list_ticket_categories |
Read | List available ticket categories |
list_tickets |
Read | List tickets with filtering and pagination |
create_ticket |
Write | Create a new ticket |
update_ticket |
Write | Update an existing ticket |
create_ticket_category |
Write | Create a new ticket category |
update_ticket_category |
Write | Update an existing ticket category |
Activities¶
| Tool | Access | Description |
|---|---|---|
count_activities |
Read | Count activities matching filter criteria |
get_activity |
Read | Get a specific activity by ID |
list_activities |
Read | List activities with filtering and pagination |
create_activity |
Write | Create a new activity |
update_activity |
Write | Update an existing activity |
Calls¶
| Tool | Access | Description |
|---|---|---|
count_calls |
Read | Count calls matching filter criteria |
get_call |
Read | Get a specific call by ID |
get_call_transcript |
Read | Get the transcript of a specific call |
list_call_transcripts |
Read | List available call transcripts |
list_calls |
Read | List calls with filtering and pagination |
create_call |
Write | Create a new call record |
update_call |
Write | Update an existing call record |
Emails¶
| Tool | Access | Description |
|---|---|---|
count_emails |
Read | Count emails matching filter criteria |
get_email |
Read | Get a specific email by ID |
list_emails |
Read | List emails with filtering and pagination |
create_email |
Write | Create a new email |
update_email |
Write | Update an existing email |
Messaging¶
Covers webchat, SMS, Facebook Messenger, Instagram, WhatsApp, and Viber.
| Tool | Access | Description |
|---|---|---|
count_chats |
Read | Count chat messages matching filter criteria |
get_chat |
Read | Get a specific chat message by ID |
list_chats |
Read | List chat messages with filtering and pagination |
create_message |
Write | Create a new chat/messaging message |
update_message |
Write | Update an existing chat/messaging message |
Contacts and CRM¶
| Tool | Access | Description |
|---|---|---|
count_accounts |
Read | Count accounts matching filter criteria |
count_contacts |
Read | Count contacts matching filter criteria |
count_crm_records |
Read | Count CRM records matching filter criteria |
get_account |
Read | Get a specific account by ID |
get_contact |
Read | Get a specific contact by ID |
get_crm_record |
Read | Get a specific CRM record by ID |
list_accounts |
Read | List accounts with filtering and pagination |
list_contacts |
Read | List contacts with filtering and pagination |
list_crm_records |
Read | List CRM records with filtering and pagination |
create_account |
Write | Create a new account |
update_account |
Write | Update an existing account |
create_contact |
Write | Create a new contact |
update_contact |
Write | Update an existing contact |
create_crm_record |
Write | Create a new CRM record |
update_crm_record |
Write | Update an existing CRM record |
Campaigns¶
| Tool | Access | Description |
|---|---|---|
count_campaign_records |
Read | Count campaign records matching filter criteria |
get_campaign_record |
Read | Get a specific campaign record by ID |
list_campaign_records |
Read | List campaign records with filtering and pagination |
list_campaign_types |
Read | List available campaign types |
create_campaign_record |
Write | Create a new campaign record |
update_campaign_record |
Write | Update an existing campaign record |
create_campaign_type |
Write | Create a new campaign type |
update_campaign_type |
Write | Update an existing campaign type |
Reference Data¶
| Tool | Access | Description |
|---|---|---|
list_groups |
Read | List agent groups |
list_pauses |
Read | List available pause types |
list_queues |
Read | List queues |
list_statuses |
Read | List ticket/activity statuses |
list_templates |
Read | List message templates |
list_users |
Read | List users |
create_group |
Write | Create a new agent group |
update_group |
Write | Update an existing agent group |
create_pause |
Write | Create a new pause type |
update_pause |
Write | Update an existing pause type |
create_queue |
Write | Create a new queue |
update_queue |
Write | Update an existing queue |
create_status |
Write | Create a new ticket/activity status |
update_status |
Write | Update an existing ticket/activity status |
create_template |
Write | Create a new message template |
update_template |
Write | Update an existing message template |
create_user |
Write | Create a new user |
update_user |
Write | Update an existing user |
Real-time¶
| Tool | Access | Description |
|---|---|---|
list_realtime_sessions |
Read | List current real-time agent sessions |
Knowledge Base¶
| Tool | Access | Description |
|---|---|---|
list_article_folders |
Read | List knowledge base folders |
list_articles |
Read | List knowledge base articles |
get_article |
Read | Get a specific knowledge base article |
create_article |
Write | Create a new knowledge base article |
update_article |
Write | Update an existing knowledge base article |
create_article_folder |
Write | Create a new knowledge base folder |
update_article_folder |
Write | Update an existing knowledge base folder |
Built-in Prompts¶
The server includes four pre-built prompt templates for common analysis workflows. These prompts are available directly in your AI client when the MCP server is connected.
| Prompt | Description |
|---|---|
email_quality_audit |
Audit recent emails for negative sentiment, unprofessional tone, and lost deals |
sales_pipeline_review |
Review deal health and identify at-risk opportunities |
call_quality_review |
Analyse calls for escalations, knowledge gaps, and quality issues |
daily_call_analysis |
Daily call review for churn risk and recurring issues |
Usage Examples¶
Once the MCP server is connected to your AI client, you can ask questions like:
- "Show me all open tickets from the last 7 days and summarise common issues."
- "Audit the last 50 emails for negative sentiment and unprofessional tone."
- "List all missed calls from today and identify patterns."
- "Review the sales pipeline and flag deals that have been stalled for more than 2 weeks."
- "Analyse call transcripts from this week and highlight any escalations."
The AI assistant will use the appropriate MCP tools to fetch data from your Daktela instance and provide structured analysis.
Best Practices¶
- Hosted server: the AI assistant acts with your own Daktela permissions β it sees exactly what you see, nothing more. There is no token to protect; revoke access by logging out of Daktela or disconnecting the server in your client.
- Self-hosted token security: never share your API Access Token publicly. Use environment variables or secret management services to store credentials, and create a dedicated API user with minimal read-only permissions rather than using an admin token.
- Caching: keep caching enabled (default) to reduce API calls for reference data like queues, users, and statuses.
- Cloud deployments: always implement authentication when exposing the self-hosted HTTP server endpoint publicly.
Support¶
If you encounter bugs or have feature requests, please use the Issues section on the GitHub repository.