Skip to content

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. Two ways to authenticate are available:

  • OAuth Login (recommended) β€” log in through a guided browser screen. No token to generate or copy.
  • Access Token (manual) β€” generate a personal token and paste it into your client config. Useful for clients that don't support OAuth-based connections, or for headless/scripted setups.

Tip

Before setting up your AI client, open Settings β†’ System β†’ Integrations β†’ Daktela MCP Server β†’ Setup guide in Daktela. It shows the exact server URL and config snippets for your instance β€” a quick reference for either authentication method below.

If your AI client supports connecting to remote MCP servers via OAuth β€” for example, by adding Daktela as a "remote MCP connector" and simply entering its server URL β€” this is the fastest way to connect.

  1. In your AI client, add the Daktela MCP server using its URL: https://YOUR_DOMAIN/mcp-server/mcp.
  2. The client detects that authentication is required and opens a Daktela login/approval screen in your browser.
  3. If you're already logged into Daktela, click Approve to grant access. Otherwise, log in with your usual Daktela credentials first, then approve.
  4. Once approved, your AI client is connected automatically β€” 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 and token exchange. The resulting access token is scoped to your Daktela user and valid for 60 minutes.

Tip

Not every MCP client supports OAuth-based remote connections yet. If yours doesn't, use the Access Token method below instead.

Access Token (Manual)

If your AI client doesn't support OAuth-based remote connections, or you're setting up a headless/scripted integration, generate a personal access token instead.

Step 1 β€” Get your Access Token

You need a personal API access token from your Daktela user profile. Go to your user profile β†’ Access Tokens and generate a new token.

Tip

Create a dedicated token for your AI assistant so you can revoke it independently if needed.

Step 2 β€” Configure your AI client

Add the configuration below to your AI client. Replace YOUR_DOMAIN with your Daktela hostname (e.g. yourcompany.daktela.com) and YOUR_ACCESS_TOKEN with the token from Step 1.

Claude Code

Add to your project .mcp.json file:

{
  "mcpServers": {
    "daktela": {
      "type": "http",
      "url": "https://YOUR_DOMAIN/mcp-server/mcp",
      "headers": {
        "X-Daktela-Access-Token": "YOUR_ACCESS_TOKEN"
      }
    }
  }
}

Alternatively, configure globally in your Claude Code settings file (macOS / Linux: ~/.claude/settings.json; Windows: %USERPROFILE%\.claude\settings.json, which expands to C:\Users\<you>\.claude\settings.json):

{
  "mcpServers": {
    "daktela": {
      "type": "http",
      "url": "https://YOUR_DOMAIN/mcp-server/mcp",
      "headers": {
        "X-Daktela-Access-Token": "YOUR_ACCESS_TOKEN"
      }
    }
  }
}

Claude Desktop

Add the following to your Claude Desktop config file. The file location depends on your OS:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json (expands to C:\Users\<you>\AppData\Roaming\Claude\claude_desktop_config.json)
{
  "mcpServers": {
    "daktela": {
      "type": "http",
      "url": "https://YOUR_DOMAIN/mcp-server/mcp",
      "headers": {
        "X-Daktela-Access-Token": "YOUR_ACCESS_TOKEN"
      }
    }
  }
}

Tip

On Windows, the AppData folder is hidden in File Explorer by default. To open the Claude folder quickly, press Win+R, paste %APPDATA%\Claude, and press Enter. Alternatively, enable Hidden items under View β†’ Show in File Explorer.

Other MCP clients

Any client that supports the MCP HTTP transport can connect using:

  • URL: https://YOUR_DOMAIN/mcp-server/mcp
  • Authentication: HTTP header X-Daktela-Access-Token: YOUR_ACCESS_TOKEN

Self-hosted (Advanced)

For custom or cloud deployments, you can run the MCP server yourself using the open-source PHP package.

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

  1. Clone the repository:

    git clone https://github.com/Daktela/daktela-v6-php-mcp-server.git
    cd daktela-v6-php-mcp-server
    
  2. Install dependencies:

    composer install
    

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.

  1. Build the image:

    docker build -f Dockerfile.prod -t daktela-v6-php-mcp-server .
    
  2. Add the following to your claude_desktop_config.json:

    {
      "mcpServers": {
        "daktela": {
          "command": "docker",
          "args": [
            "run", "-i", "--rm",
            "-e", "DAKTELA_URL=https://your-instance.daktela.com",
            "-e", "DAKTELA_ACCESS_TOKEN=your-api-token",
            "daktela-v6-php-mcp-server"
          ]
        }
      }
    }
    

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

  • Token Security: Never share your API Access Token publicly. Use environment variables or secret management services to store credentials.
  • Caching: Keep caching enabled (default) to reduce API calls for reference data like queues, users, and statuses.
  • Access Control: Create a dedicated API user with minimal read-only permissions for the MCP server rather than using an admin token.
  • Cloud Deployments: Always implement authentication when exposing the HTTP server endpoint publicly.

Support

If you encounter bugs or have feature requests, please use the Issues section on the GitHub repository.