# Without authentication (works!)
curl -X GET https://vedaya-kge.fly.dev/mcp/status

# With optional authentication
curl -X GET https://vedaya-kge.fly.dev/mcp/status \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
  "servers_connected": 2,
  "servers": {
    "server1": {
      "status": "connected",
      "tools": ["tool1", "tool2"],
      "capabilities": ["search", "compute"]
    },
    "server2": {
      "status": "connected",
      "tools": ["tool3"],
      "capabilities": ["storage"]
    }
  }
}
The MCP (Model Context Protocol) endpoints provide information about connected MCP servers and their available tools.

Quick Start

import requests

# No authentication needed!
response = requests.get("https://vedaya-kge.fly.dev/mcp/status")
mcp_status = response.json()
print(f"Connected servers: {mcp_status.get('servers_connected', 0)}")

# Get available tools
response = requests.get("https://vedaya-kge.fly.dev/mcp/tools")
tools = response.json()
for tool_name in tools:
    print(f"Tool: {tool_name}")

Get MCP Status

Get the status of connected MCP servers and available tools.
# Without authentication (works!)
curl -X GET https://vedaya-kge.fly.dev/mcp/status

# With optional authentication
curl -X GET https://vedaya-kge.fly.dev/mcp/status \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
  "servers_connected": 2,
  "servers": {
    "server1": {
      "status": "connected",
      "tools": ["tool1", "tool2"],
      "capabilities": ["search", "compute"]
    },
    "server2": {
      "status": "connected",
      "tools": ["tool3"],
      "capabilities": ["storage"]
    }
  }
}

Get MCP Tools

Get detailed information about available MCP tools.
# Without authentication (works!)
curl -X GET https://vedaya-kge.fly.dev/mcp/tools

# With optional authentication
curl -X GET https://vedaya-kge.fly.dev/mcp/tools \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
  "query_knowledge_graph": {
    "description": "Query the Vedaya knowledge graph using natural language",
    "parameters": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Natural language query"
        },
        "mode": {
          "type": "string",
          "enum": ["naive", "local", "global", "hybrid"],
          "description": "Query mode"
        }
      },
      "required": ["query"]
    },
    "server": "vedaya-mcp-server"
  },
  "upload_documents": {
    "description": "Upload documents to the knowledge base",
    "parameters": {
      "type": "object",
      "properties": {
        "texts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Document texts to upload"
        }
      },
      "required": ["texts"]
    },
    "server": "vedaya-mcp-server"
  }
}

Get MCP Information

Get general information about the MCP integration.
# Without authentication (works!)
curl -X GET https://vedaya-kge.fly.dev/mcp/info

# With optional authentication
curl -X GET https://vedaya-kge.fly.dev/mcp/info \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
  "version": "1.0.0",
  "servers_connected": 2,
  "total_tools": 5,
  "configuration": {
    "timeout": 30,
    "max_retries": 3,
    "enabled": true
  }
}

What is MCP?

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between AI applications and external data sources and tools. It provides a standardized way to:
  • Connect to external systems and APIs
  • Access and manipulate data from various sources
  • Execute tools and functions
  • Maintain context across different services

Use Cases

MCP integration in Vedaya enables:
  1. Extended Capabilities: Access tools and functions from connected MCP servers
  2. Data Integration: Connect to external data sources through MCP providers
  3. Workflow Automation: Chain MCP tools with RAG queries for complex workflows
  4. Custom Extensions: Add your own MCP servers to extend Vedaya’s functionality

Complete Working Example

import requests
import json

# API Configuration (no auth needed!)
API_BASE_URL = "https://vedaya-kge.fly.dev/"

def check_mcp_capabilities():
    """Check available MCP servers and tools"""
    
    # 1. Check MCP status
    print("Checking MCP status...")
    response = requests.get(f"{API_BASE_URL}/mcp/status")
    if response.status_code == 200:
        status = response.json()
        print(f"✅ MCP servers connected: {status.get('servers_connected', 0)}")
    else:
        print(f"❌ MCP status check failed: {response.status_code}")
        return
    
    # 2. Get available tools
    print("\nAvailable MCP tools:")
    response = requests.get(f"{API_BASE_URL}/mcp/tools")
    if response.status_code == 200:
        tools = response.json()
        for tool_name, tool_info in tools.items():
            print(f"  - {tool_name}: {tool_info.get('description', 'No description')}")
    else:
        print(f"❌ Failed to get tools: {response.status_code}")
    
    # 3. Get MCP info
    print("\nMCP Integration info:")
    response = requests.get(f"{API_BASE_URL}/mcp/info")
    if response.status_code == 200:
        info = response.json()
        print(f"  Version: {info.get('version', 'Unknown')}")
        print(f"  Total tools: {info.get('total_tools', 0)}")
    else:
        print(f"❌ Failed to get info: {response.status_code}")

# Run the check
check_mcp_capabilities()

Error Responses

Status CodeDescription
401Unauthorized - Invalid or missing authentication (only for protected resources)
500Server error - MCP service unavailable
503Service unavailable - No MCP servers connected
Most MCP endpoints work without authentication. The API returns public MCP server information by default.