Skip to main content

Tydli Platform API Reference

The Tydli Platform API allows you to manage your deployments and OAuth clients programmatically.

Base URL

All API requests should be made to:
https://your-project.supabase.co/functions/v1

Authentication

Most endpoints require authentication. You can authenticate using:
  • Bearer Token: Authorization: Bearer <your-jwt-token>

OAuth 2.1 Server

Endpoints for managing OAuth clients and performing OAuth flows.

Register Client

Register a new OAuth client for your deployment.
  • Endpoint: POST /mcp-oauth-server/register
  • Content-Type: application/json
Request Body:
{
  "client_name": "My Client",
  "redirect_uris": ["http://localhost:3000/callback"],
  "scope": "openid email"
}
Response:
{
  "client_id": "mcp_...",
  "client_secret": "secret_...",
  "client_name": "My Client",
  "redirect_uris": ["..."]
}

Authorization Endpoint

The URL to redirect users to for authorization.
  • URL: GET /mcp-oauth-server/authorize
  • Parameters:
    • INLINE_CODE_4: Your client ID
    • INLINE_CODE_5: INLINE_CODE_6
    • INLINE_CODE_7: One of your registered redirect URIs
    • INLINE_CODE_8: PKCE code challenge
    • INLINE_CODE_9: INLINE_CODE_10
    • INLINE_CODE_11: Random string for CSRF protection

Token Endpoint

Exchange an authorization code for an access token.
  • URL: POST /mcp-oauth-server/token
  • Content-Type: application/json
Request Body:
{
  "grant_type": "authorization_code",
  "code": "auth_code_from_callback",
  "redirect_uri": "http://localhost:3000/callback",
  "client_id": "your_client_id",
  "code_verifier": "pkce_code_verifier"
}

MCP Router

Endpoints for interacting with your deployed MCP servers.

Invoke Tool

Call a tool on your deployed MCP server.
  • Endpoint: POST /mcp-router/{deployment_slug}
  • Headers:
    • INLINE_CODE_15: INLINE_CODE_16
Request Body:
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "tool_name",
    "arguments": {
      "arg1": "value"
    }
  },
  "id": 1
}

Discovery

Protected Resource Metadata

Discover OAuth configuration for a resource.
  • Endpoint: GET /mcp-router/{deployment_slug}/.well-known/oauth-protected-resource
Response:
{
  "resource": "https://...",
  "authorization_servers": ["https://..."],
  "scopes_supported": ["openid", "email", "mcp.tools.execute"]
}