Skip to content

Integration · Developer tools

Connect Claude & ChatGPT to Dify

Ask your AI to put a question to one of your Dify apps, run a Dify workflow with the inputs you give, or look something up in a knowledge base. It can read conversations and workflow logs, manage knowledge base documents and chunks, and keep your saved question-and-answer annotations up to date.

Connect Dify free

Free plan, no credit card. Takes about a minute.

Try asking

  • “Ask our support bot how refunds work.”

    The AI sends the question to your Dify chat app and returns its reply. It can keep going in the same conversation.

  • “Run the lead scoring workflow for Acme.”

    It reads the workflow's input form, runs it with your values and returns the outputs.

  • “Which workflow runs failed today?”

    It lists workflow logs filtered by status and date, and opens a run to see its inputs and outputs.

What your AI can do

Apps and workflows

Chat with a chat app, run a text generation app or a workflow, and read workflow runs and logs.

Knowledge bases

List, create and search knowledge bases, add or update documents from text, and edit their chunks.

Conversations and feedback

Read, rename and delete conversations, rate replies, read user feedback and manage annotations.

  • “Search the product knowledge base for warranty terms.”

    It searches the knowledge base and returns the best-matching chunks.

  • “Add this FAQ text as a new document in the Help Center knowledge base.”

    It creates the document from plain text, and you can check its indexing status afterwards.

  • “What feedback have users left on the app's answers?”

    It lists the like and dislike feedback end users have given on the app's replies.

29 tools for Dify

These tools are switched on when you connect. You can switch any of them off, or require your approval before it runs.

  • add_document_chunksChanges dataAdd chunks to a document. Pass `dataset_id`, `document_id` and `segments` (each with `content`, optional `answer` and `keywords`).
  • create_annotationChanges dataAdd a saved reply the app can use: pass `question` and `answer`.
  • create_completionVisible to othersRun the connected text-generation app once. Pass `inputs` and a `user` ID; use `response_mode` blocking.
  • create_document_from_textChanges dataAdd a document to a knowledge base from plain text. Pass `dataset_id`, `name` and `text`; `indexing_technique` is needed for the first document in an empty knowledge base.
  • create_knowledge_baseChanges dataCreate an empty knowledge base with `name` and optional `description`.
  • delete_conversationDeletesPermanently delete a conversation. Pass the conversation ID in `message_id` and the `user` ID.
  • delete_documentDeletesPermanently delete a document from a knowledge base. Pass `dataset_id` and `document_id`.
  • get_app_infoGet the connected Dify app's name, description and mode.
  • get_app_parametersGet the connected app's input form and settings. Check this first to learn which `inputs` variables chat, completion and workflow calls expect.
  • get_documentGet one document's details and indexing status. Pass `dataset_id` and `document_id`.
  • get_knowledge_baseGet one knowledge base's settings and stats by `dataset_id`.
  • get_workflow_runGet one workflow run's status, inputs and outputs by `workflow_run_id`.
  • list_annotationsList the app's saved question-and-answer annotations, optionally filtered by `keyword`.
  • list_app_feedbackList the like and dislike feedback end users have given on the app's replies.
  • list_conversation_messagesRead the messages of one conversation. Pass `conversation_id` and the same `user` ID used in the chat.
  • list_conversationsList chat conversations for a `user` ID, newest first by default.
  • list_document_chunksList the chunks of a document. Pass `dataset_id` and `document_id`, optionally a `keyword`.
  • list_documentsList the documents in a knowledge base by `dataset_id`, filtered by `keyword` or `status`.
  • list_knowledge_basesList knowledge bases, optionally filtered by `keyword` or `tag_ids`. Use this to find a `dataset_id`.
  • list_workflow_logsList past workflow runs, filtered by `keyword`, `status` or creation dates.
  • rate_messageVisible to othersRate an app reply as like or dislike. Pass `message_id`, `user`, `rating` and optional `content`.
  • rename_conversationChanges dataRename a conversation. Pass `conversation_id`, `user`, and a new `name` (or set `auto_generate` to true).
  • run_workflowChanges dataRun the connected workflow app. Pass `inputs` with the workflow's variables and a `user` ID; use `response_mode` blocking. Returns the run's outputs.
  • search_knowledge_baseChanges dataSearch a knowledge base for passages relevant to `query`. Pass `dataset_id`. Returns the best-matching chunks.
  • send_chat_messageVisible to othersSend a message to the connected chat app and get its reply. Pass `query`, `inputs` (an object, empty if the app has no variables), a stable `user` ID, and `conversation_id` to continue a chat. Use `response_mode` blocking.
  • update_annotationChanges dataChange an annotation's `question` and `answer` by `annotation_id`.
  • update_document_chunkChanges dataEdit one chunk's content, answer, keywords or enabled state. Pass `dataset_id`, `document_id`, `segment_id` and `segment`.
  • update_document_textChanges dataReplace a document's name or text. Pass `dataset_id`, `document_id`, and new `name` and/or `text`. The document is re-indexed.
  • update_knowledge_baseChanges dataUpdate a knowledge base's `name`, `description` or `permission` by `dataset_id`.

Set up in three steps

  1. 1

    Pick the app

    Create a free PipMCP account and choose Dify from the app list.

  2. 2

    Paste your key

    Paste a Dify API key. For an app, open it in Dify, go to its API Access page and create a key. Each key works for that one app. For knowledge bases, go to Knowledge, click Service API in the top right and create a key there. The connection uses Dify Cloud (api.dify.ai).

  3. 3

    Add the link to your AI

    You get a personal MCP link. Add it to Claude, ChatGPT or Cursor:

    1. Click your name, then Settings › Connectors › Add custom connector.
    2. Paste your link as the Remote MCP server URL.
    3. Switch it on from the + menu in a chat.

Questions

What can the AI do in Dify?

With an app key, the AI can read the app's info and input form, send chat messages, run completions and workflows, read workflow runs and logs, and work with conversations, feedback and annotations. With a knowledge key, it can list, create, update and search knowledge bases and add, update, delete and chunk documents.

Does the AI see my Dify API key?

No. Your Dify API key is encrypted at rest and never shown to the AI. After you save it, it is not shown again, not even to you. The AI only sees the results of the tools it calls.

Can I control what the AI is allowed to do?

Yes. You choose which tools are switched on, so you can start with reading and searching only. Deleting a document or a conversation is permanent, and both can require your approval before they run. Every tool call is logged.

Does it work with ChatGPT?

Yes. In ChatGPT go to Settings › Apps & Connectors › Advanced and turn on Developer mode, then add your PipMCP link. Developer mode needs a paid ChatGPT plan: Plus, Pro, Business or Enterprise. The same link also works in Claude (Settings › Connectors › Add custom connector), Cursor and other MCP clients.

What does it cost?

PipMCP has a free plan with no credit card required. Paid plans bill per completed task. You also need your own Dify account.

Why does Dify use different keys for apps and knowledge bases?

In Dify, an app API key works for one app, and knowledge bases have their own Service API key. With an app key, the AI can chat with or run that app. With a knowledge key, it can work with your knowledge bases. Use the key that fits what you want the AI to do.

Let your AI work in Dify today.

Start free. Your key stays encrypted, and you decide what the AI may do.

Connect Dify free

PipMCP is not affiliated with Dify. Product names are trademarks of their owners.