๐Ÿค– Dialogflow CX MCP Server ๐Ÿš€

๐Ÿค– Dialogflow CX MCP Server ๐Ÿš€

Yash-Kavaiya

Developer Tools
Visit Server

README

๐Ÿค– Dialogflow CX MCP Server ๐Ÿš€

Dialogflow CX MCP Python

A powerful Model Control Protocol (MCP) server implementation for Google Dialogflow CX, enabling seamless integration between AI assistants and Google's advanced conversational platform.

๐Ÿ’ก Pro Tip: This server bridges the gap between AI assistants and Dialogflow CX, unlocking powerful conversational capabilities!

๐Ÿ“‹ Overview

This project provides a suite of tools that allow AI assistants to interact with Dialogflow CX agents through a standardized protocol. The server handles all the complexity of managing conversations, processing intent detection, and interfacing with Google's powerful NLU systems.

โœจ Key Features

  • ๐Ÿ”„ Bidirectional communication with Dialogflow CX
  • ๐ŸŽฏ Intent detection and matching capabilities
  • ๐ŸŽค Audio processing for speech recognition
  • ๐Ÿ”Œ Webhook request/response handling
  • ๐Ÿ“ Session management for persistent conversations
  • ๐Ÿ”’ Secure API authentication

๐Ÿ”ง Requirements

Requirement Description Version
๐Ÿ Python Programming language 3.12+
โ˜๏ธ Google Cloud Project with Dialogflow CX enabled Latest
๐Ÿค– Dialogflow CX Conversational agent Latest
๐Ÿ”‘ API Credentials Authentication for Google services -

๐Ÿš€ Installation

๐Ÿณ Using Docker

# Clone the repository
git clone https://github.com/Yash-Kavaiya/mcp-server-conversation-agents.git
cd mcp-server-conversation-agents

# Build the Docker image
docker build -t dialogflow-cx-mcp .

# Run the container
docker run -it dialogflow-cx-mcp

๐Ÿ’ป Manual Installation

# Clone the repository
git clone https://github.com/Yash-Kavaiya/mcp-server-conversation-agents.git
cd mcp-server-conversation-agents

# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install the package
pip install -e .

โš™๏ธ Configuration

You'll need to provide the following configuration parameters:

Parameter Description Example
dialogflowApiKey Your Dialogflow API key "abc123def456"
projectId Google Cloud project ID "my-dialogflow-project"
location Location of the agent "us-central1"
agentId ID of your Dialogflow CX agent "12345-abcde-67890"

These can be set as environment variables:

export DIALOGFLOW_API_KEY=your_api_key
export PROJECT_ID=your_project_id
export LOCATION=your_location
export AGENT_ID=your_agent_id

๐Ÿ“Š Architecture

graph TD
    A[AI Assistant] <-->|MCP Protocol| B[MCP Server]
    B <-->|Google API| C[Dialogflow CX]
    C <-->|NLU Processing| D[Intent Detection]
    C <-->|Conversation Management| E[Session Management]
    B <-->|Webhooks| F[External Services]

๐Ÿ› ๏ธ Usage

The MCP server exposes the following tools for AI assistants:

๐Ÿ” initialize_dialogflow

Initialize the Dialogflow CX client with your project details.

await initialize_dialogflow(
    project_id="your-project-id",
    location="us-central1",
    agent_id="your-agent-id",
    credentials_path="/path/to/credentials.json"  # Optional
)

๐Ÿ’ฌ detect_intent

Detect intent from text input.

response = await detect_intent(
    text="Hello, how can you help me?",
    session_id="user123",  # Optional
    language_code="en-US"  # Optional
)

๐ŸŽค detect_intent_from_audio

Process audio files to detect intent.

response = await detect_intent_from_audio(
    audio_file_path="/path/to/audio.wav",
    session_id="user123",  # Optional
    sample_rate_hertz=16000,  # Optional
    audio_encoding="AUDIO_ENCODING_LINEAR_16",  # Optional
    language_code="en-US"  # Optional
)

๐ŸŽฏ match_intent

Match intent without affecting the conversation session.

response = await match_intent(
    text="What are your hours?",
    session_id="user123",  # Optional
    language_code="en-US"  # Optional
)

๐Ÿ”„ Webhook Handling

Parse webhook requests and create webhook responses:

# Parse a webhook request
parsed_request = await parse_webhook_request(request_json)

# Create a webhook response
response = await create_webhook_response({
    "messages": ["Hello! How can I help you today?"],
    "parameter_updates": {"user_name": "John"}
})

๐Ÿ”ง Response Format

Here's an example of the response format:

<details> <summary>๐Ÿ“‹ Click to expand</summary>

{
  "messages": [
    {
      "type": "text",
      "content": "Hello! How can I help you today?"
    }
  ],
  "intent": {
    "name": "greeting",
    "confidence": 0.95
  },
  "parameters": {
    "user_name": "John"
  },
  "current_page": "Welcome Page",
  "session_id": "user123",
  "end_interaction": false
}

</details>

๐Ÿ”— Smithery Integration

This project is configured to work with Smithery.ai, a platform that allows for easy deployment and management of MCP servers.

๐Ÿ’ก Pro Tip: Smithery.ai integration enables one-click deployment and simplified management of your Dialogflow CX MCP server!

๐Ÿ“„ License

License: MIT

๐Ÿ‘ฅ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contribution Workflow

  1. ๐Ÿด Fork the repository
  2. ๐Ÿ”ง Create a feature branch (git checkout -b feature/amazing-feature)
  3. ๐Ÿ’ป Commit your changes (git commit -m 'Add some amazing feature')
  4. ๐Ÿš€ Push to the branch (git push origin feature/amazing-feature)
  5. ๐Ÿ” Open a Pull Request

<p align="center"> Built with โค๏ธ by the MCP Server team </p>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python