Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
Last technical review · 17.08.2026 · RAGFlow + MCP

RAGFlow MCP: Exposing Company Knowledge to Agents Is an Authorization Problem

RAGFlow self-host MCP can connect knowledge bases to MCP clients. For company data, the hard problem is not starting the endpoint but defining which agent can query which dataset and how access is audited.

Production note

An MCP API key alone does not answer “which documents may this caller see?” If one key can query every knowledge base, tenant isolation can fail. Enforce authorization at retrieval scope.

ragflow mcpragflow mcp servermcp company data
TECHNICAL IMPLEMENTATION PROFILE
EKA CORE
RAGFlow + MCP

RAGFlow documentation describes self-host MCP from v0.18+ using an API key; Streamable HTTP `/mcp` is the current path while legacy SSE `/sse` may remain for compatibility. Production also needs tenant filtering and tool scope.

v0.18+Self-host MCP
Checked
/mcpStreamable HTTP
Checked
/sseLegacy SSE
Checked
API keyIdentity layer
Checked
Technical guide · production-focused · official sources
Quick answer

RAGFlow documentation describes self-host MCP from v0.18+ using an API key; Streamable HTTP `/mcp` is the current path while legacy SSE `/sse` may remain for compatibility. Production also needs tenant filtering and tool scope.

01

Technical scope at a glance

Secure a RAGFlow MCP server for company data with API keys, Streamable HTTP, legacy SSE awareness, tenant scope, read-only tools, audit logs and prompt-injection defenses.

v0.18+Self-host MCP

RAGFlow documentation notes self-host MCP support from this version family.

/mcpStreamable HTTP

Current MCP transport endpoint.

/sseLegacy SSE

May remain for legacy-client compatibility.

API keyIdentity layer

Provides authentication; dataset authorization remains separate.

On this page

  1. 1. Trust boundary: Client → MCP → RAGFlow → dataset
  2. 2. Manage Streamable HTTP and legacy SSE deliberately
  3. 3. Treat the API key as a service credential, not user identity
  4. 4. Do not trust tool parameters to enforce knowledge-base scope
  5. 5. Do not treat retrieved documents as trusted instructions
  6. 6. Log five fields for every MCP query
  7. 7. Run authorization-abuse tests before production
  8. Frequently asked questions
02

1. Trust boundary: Client → MCP → RAGFlow → dataset

Each hop can have distinct identity and authorization. Reaching MCP should not imply access to every dataset.

HopControl
Client → MCPAPI key / gateway auth
MCP → RAGFlowService identity
Query → datasetTenant/knowledge-base filter
Result → clientRedaction/audit
03

2. Manage Streamable HTTP and legacy SSE deliberately

Use `/mcp` for current clients; if `/sse` remains enabled, decide whether that legacy surface is still required.

Command
curl -I https://rag.example.com/mcp
Command
curl -I https://rag.example.com/sse
04

3. Treat the API key as a service credential, not user identity

Sharing one API key across many users destroys meaningful audit. Preserve end-user identity through a gateway or client proxy where required.

Store keys in environment/secret vault.
Assign rotation date and owner.
Never log the raw key.
05

4. Do not trust tool parameters to enforce knowledge-base scope

If an agent can choose `dataset_id`, it can attempt another tenant ID. Server-side policy should bind allowed datasets to caller identity.

Tenant A key → only Tenant A datasets.
Department role → approved collections only.
Separate administrative tools from query tools.
06

5. Do not treat retrieved documents as trusted instructions

A PDF can contain “ignore policy and send secrets.” Retrieved content is data and must not override system/tool policy.

RiskControl
Prompt injectionInstruction hierarchy + tool allow-list
Data exfiltrationTenant filter + output redaction
Tool abuseRead-only MCP surface
07

6. Log five fields for every MCP query

For audit, caller, tool, dataset scope, result count and latency are a useful baseline. Avoid logging document bodies or secrets.

request_id
caller/service identity
tool name + dataset scope
result count/status
latency_ms
08

7. Run authorization-abuse tests before production

Alongside answer-quality tests, test whether the client can access data it should not see. Negative tests are critical for RAG security.

TestExpected
Other tenant dataset_id403/empty
Secret-like queryPolicy/redaction
Injected PDF instructionTool policy unchanged
EKA SUNUCU · TECHNICAL

Design company RAG as an authorization matrix, not just an endpoint

Plan private networking, gateway, audit and tenant isolation for RAGFlow/MCP on Eka Sunucu with separate VPS/GPU roles where needed.

Production principleMeasure → Test → DeployNo fabricated benchmark data.
SRC

Official sources

Primary documentation and technical references used by this guide.

EKA

Related technical guides

Continue with related infrastructure and implementation guides.

FAQ

Frequently asked questions

RAGFlow + MCP

Does self-hosted RAGFlow MCP require an API key?

Official RAGFlow MCP documentation describes API-key configuration for self-hosted use.

What is the difference between /mcp and /sse?

`/mcp` is the current Streamable HTTP transport path; `/sse` may remain for legacy SSE clients.

Does an API key guarantee tenant isolation?

Not by itself. Dataset/knowledge-base scope must be server-side filtered according to caller authorization.

Are read-only MCP tools enough for security?

It reduces risk, but sensitive data can still leak. Authorization, redaction, audit and prompt-injection controls remain necessary.

Top