Skip to main content
Connect Dify workflows and chatbots to Civic’s MCP Hub. Dify supports MCP tool servers via its built-in tools configuration — no code required.

Prerequisites

  • A Dify account (cloud at dify.ai or self-hosted)
  • A Civic account at nexus.civic.com with a configured toolkit
  • A Civic token

Get Your Credentials

You need your Civic MCP URL and a Civic token before configuring Dify.

Get Your Credentials

How to generate a Civic token and configure toolkit URL parameters

Connect Civic to Dify

1

Open Tool Settings

In Dify, go to Tools in the top navigation, then click Custom ToolsCreate Custom Tool.
2

Configure the MCP server

Select MCP as the tool type and enter your Civic MCP URL:
https://nexus.civic.com/hub/mcp?profile=your-toolkit
Set the authentication header:
Authorization: Bearer your-civic-token
3

Import tools

Dify will connect to Civic and list the available tools. Select the tools you want to enable in your workflows.
4

Add tools to your app

Open your Dify app (chatbot, workflow, or agent). In the Tools section, add the Civic tools you imported.
5

Test the connection

Run your app and ask it to use a Civic tool (e.g., “List my calendar events”). Dify will call the tool through the Civic Hub.

Locking to a Toolkit

For production apps, lock to a specific toolkit by adding the profile parameter to your MCP URL:
https://nexus.civic.com/hub/mcp?profile=your-production-toolkit
When a profile is set, the session is locked — the agent cannot switch toolkits or modify its own guardrails.

Next Steps

Agent Deployment

Profile locking, URL params, and production agent configuration

Guardrails

Constrain what tools your Dify app can call

Audit Trail

Query what your app did via Civic Chat

Get Credentials

Token generation and URL parameter reference