MCP Agent Strategy

MCP Agent Strategy

By hjlarry GitHub

-

Overview

what is MCP Agent Strategy?

MCP Agent Strategy is a Dify Agent strategy plugin that integrates MCP tool calls and common function calls capabilities, allowing for flexible server connections and enhanced functionality.

how to use MCP Agent Strategy?

To use MCP Agent Strategy, configure your MCP server settings in the provided configuration files and run the agent with the desired transport method.

key features of MCP Agent Strategy?

  • Full compatibility with official function call agent strategy
  • Seamless integration with MCP tool calls
  • Flexible MCP server connection options

use cases of MCP Agent Strategy?

  1. Integrating multiple MCP servers for enhanced functionality
  2. Customizing server connections for specific application needs
  3. Utilizing the plugin in various Dify applications for improved performance

FAQ from MCP Agent Strategy?

  • How do I set up a single MCP server?

Simply provide the server URL in the basic configuration section.

  • Can I connect to multiple MCP servers?

Yes! You can configure multiple servers with detailed connection parameters.

  • What programming language is used for this plugin?

The MCP Agent Strategy plugin is developed in Python.

Content

MCP Agent Strategy

Author: hjlarry
Version: 0.0.2
Type: agent strategy
Repo&Issue: https://github.com/hjlarry/dify-plugin-mcp_agent

A Dify Agent strategy plugin that integrates MCP tool calls and common function calls capabilities.

Features

  • Full compatibility with official function call agent strategy
  • Seamless integration with MCP tool calls
  • Flexible MCP server connection options

Getting Started

agent

Basic Configuration

For single MCP server setup, simply provide the server URL:

http://localhost:8000/sse

Advanced Configuration

For multiple MCP servers with detailed connection parameters:

{
  "server_name1": {
    "url": "http://127.0.0.1:8000/sse",
    "headers": {},
    "timeout": 5,
    "sse_read_timeout": 300
  },
  "server_name2": {
    "url": "http://127.0.0.1:8001/sse"
  }
}

How to change MCP server from stdio to sse ?

Option 1: source code modification

if __name__ == "__main__":
    mcp.run(transport='sse')

Option 2: using the mcp-proxy

uv tool install mcp-proxy
mcp-proxy --sse-host=0.0.0.0 --sse-port=8080 uvx your-server
No tools information available.
No content found.