
Connect AI agents to GuidedMind via Model Context Protocol with SSE transport.
The Model Context Protocol (MCP) lets AI agents access your RAG system as standard tools. GuidedMind implements MCP over SSE (Server-Sent Events) transport.
| Endpoint | Method | Purpose |
|---|---|---|
/api/v1/mcp/sse | GET | Establish SSE connection |
/api/v1/mcp/messages | POST | Send JSON-RPC messages |
/api/v1/mcp/health | GET | Health check |
curl -N "https://api.guidedmind.ai/api/v1/mcp/sse?api_key=rk_your_key_here"Response:
event: open
data: {"session_id": "uuid-here", "message_endpoint": "/api/v1/mcp/messages?session_id=uuid-here"}
curl -X POST "https://api.guidedmind.ai/api/v1/mcp/messages?session_id=YOUR_SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'All messages follow JSON-RPC 2.0:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rag_search",
"arguments": {
"query": "What is RAG?"
}
}
}| Tool | Purpose |
|---|---|
rag_search | Search your document index |
upload_document | Upload a document |
upload_and_process | Upload and process immediately |
See MCP Per Tool for detailed parameter documentation.
Pass your API key as a query parameter on the SSE connection:
/api/v1/mcp/sse?api_key=rk_your_key_here
The session ID from the open event is then used for all subsequent message requests.
Each SSE session is single-use. Create a new connection for each agent session.
Errors are returned as JSON-RPC error responses:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "Method not found"
}
}| Code | Meaning |
|---|---|
| -32700 | Parse error |
| -32600 | Invalid request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32000 | Server error |
| Method | Purpose |
|---|---|
initialize | Initialize MCP session |
tools/list | List available tools |
tools/call | Call a specific tool |