Skip to main content

MCP Overview

Model Context Protocol (MCP) lets AI applications discover and call tools exposed by an MCP server. RAGFlow supports both sides of this integration:

GoalRAGFlow's roleStart here
Call RAGFlow retrieval, dataset, and chat-listing tools from another applicationMCP serverUse RAGFlow as an MCP Server
Use tools from another system in a RAGFlow AgentMCP clientConnect an External MCP Server to RAGFlow

Use RAGFlow as an MCP server

The Go API server exposes RAGFlow tools directly at its built-in MCP endpoint.

External MCP client
↓ MCP request
Go API server: /api/v1/mcp or optional MCP listener
↓
RAGFlow services (datasets, chats, retrieval)

Use the built-in POST /api/v1/mcp route, or enable the optional listener when you need a separate /mcp endpoint or legacy SSE. Both are owned by the Go API process and call RAGFlow services directly.

See Use RAGFlow as an MCP Server for endpoints and authentication, RAGFlow MCP Tools for the registered tools, and RAGFlow MCP Client Examples for requests.

Connect an external MCP server to RAGFlow

RAGFlow can also connect to third-party or self-hosted MCP servers. Their tools become available to RAGFlow Agents.

External MCP server → RAGFlow Agent → tool invocation

See Connect an External MCP Server to RAGFlow for supported transports, connection requirements, and an example.