Documentation Index
Fetch the complete documentation index at: https://docs.tydli.io/llms.txt
Use this file to discover all available pages before exploring further.
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.
Call a tool on your deployed MCP server.
- Endpoint:
POST /mcp-router/{deployment_slug}/messages
- Headers:
- INLINE_CODE_15: INLINE_CODE_16
Request Body:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "tool_name",
"arguments": {
"arg1": "value"
}
},
"id": 1
}
List Resources
List all resources defined for a deployment.
- Endpoint:
POST /mcp-router/{deployment_slug}/messages
Request Body:
{
"jsonrpc": "2.0",
"method": "resources/list",
"params": {},
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resources": [
{
"uri": "file://config.json",
"name": "config",
"title": "Configuration",
"description": "Application configuration",
"mimeType": "application/json"
}
],
"nextCursor": null
}
}
Read Resource
Read content of a specific resource by URI.
- Endpoint:
POST /mcp-router/{deployment_slug}/messages
Request Body:
{
"jsonrpc": "2.0",
"method": "resources/read",
"params": {
"uri": "file://config.json"
},
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"contents": [
{
"uri": "file://config.json",
"mimeType": "application/json",
"text": "{\"key\": \"value\"}"
}
]
}
}
List Prompts
List all prompts defined for a deployment.
- Endpoint:
POST /mcp-router/{deployment_slug}/messages
Request Body:
{
"jsonrpc": "2.0",
"method": "prompts/list",
"params": {},
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"prompts": [
{
"name": "summarize",
"title": "Summarize Document",
"description": "Summarize a document in a specific language",
"arguments": [
{"name": "content", "required": true},
{"name": "language", "required": false}
]
}
],
"nextCursor": null
}
}
Get Prompt
Get a specific prompt and render its template with arguments.
- Endpoint:
POST /mcp-router/{deployment_slug}/messages
Request Body:
{
"jsonrpc": "2.0",
"method": "prompts/get",
"params": {
"name": "summarize",
"arguments": {
"content": "This is the document text...",
"language": "English"
}
},
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"description": "Summarize a document in a specific language",
"messages": [
{
"role": "user",
"content": {
"type": "text",
"text": "Please summarize this in English:\n\nThis is the document text..."
}
}
]
}
}
Discovery
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"]
}