mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-07-22 04:15:24 -04:00
[PR #530] fix: patch mint-mcp to resolve 'Cannot read properties of undefined' error & add MCP integration #557
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-docs/pull/530
Author: @caapap
Created: 11/20/2025
Status: 🔄 Open
Base:
main← Head:main📝 Commits (1)
8f60dc8fix: add MCP integration and patch mint-mcp tool issue📊 Changes
4 files changed (+10593 additions, -0 deletions)
View changed files
📝
docs.json(+3 -0)➕
package-lock.json(+10547 -0)➕
package.json(+27 -0)➕
patches/@mintlify+mcp+1.1.216.patch(+16 -0)📄 Description
What does this PR do?
This PR fixes a critical issue preventing the setup of the MCP (Model Context Protocol) server for Dify documentation. It also adds the necessary MCP configuration to
docs.json.Problem
When running
npx mint-mcp add dify-6c0370d8, the installation fails with:This is caused by a data structure mismatch in the deprecated
mint-mcppackage where it expects a nestedtool.toolobject, but the API returns a flattoolobject.Changes
docs.json: Addedintegrations.mcpconfiguration pointing todify-6c0370d8.patches/@mintlify+mcp+1.1.216.patch: Added a patch file usingpatch-packageto fix thecli-config.jsin@mintlify/mcp. This allows the tool to correctly parse the API response by handling both nested and flat tool object structures.package.json: Addedpatch-packagedependency andpostinstallscript to ensure the patch is applied automatically afternpm install.How to verify
npm installnpx mint-mcp add dify-6c0370d8~/.mcp/dify-6c0370d8Technical Details
The fix modifies
node_modules/@mintlify/mcp/bin/utils/cli-config.jsin theinitializeToolsFromConfigfunction to handle both data structures:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.