Overview
The MCP Server exposes tools that AI agents (Claude, Cursor, Jarvis) can call to interact with Trending Society systems.
Endpoint: https://mcp.trendingsociety.com
Deployment: Cloudflare Workers
Authentication
All requests require an API key:
Authorization: Bearer YOUR_API_KEY
API keys are stored in Cloudflare KV and can be created via the admin dashboard.
list_tables
Lists all tables in the Supabase database.
{
"tool": "list_tables",
"params": {
"schema": "public"
}
}
Response:
{
"tables": [
"users",
"organizations",
"publisher_posts",
...
]
}
execute_sql
Executes a read-only SQL query.
{
"tool": "execute_sql",
"params": {
"query": "SELECT * FROM publisher_verticals LIMIT 10"
}
}
Response:
{
"data": [
{ "id": "...", "name": "Travel", "slug": "travel" },
...
],
"count": 6
}
Only SELECT queries are allowed. INSERT/UPDATE/DELETE will be rejected.
get_products
Fetches products from Shopify.
{
"tool": "get_products",
"params": {
"limit": 10,
"status": "active"
}
}
Response:
{
"products": [
{
"id": "gid://shopify/Product/123",
"title": "Product Name",
"price": "29.99",
"inventory": 50
}
]
}
get_orders
Fetches recent orders.
{
"tool": "get_orders",
"params": {
"limit": 10,
"status": "any"
}
}
Response:
{
"orders": [
{
"id": "gid://shopify/Order/456",
"customer": "[email protected]",
"total": "59.99",
"status": "paid"
}
]
}
create_issue
Creates a Linear issue.
{
"tool": "create_issue",
"params": {
"title": "Fix login bug",
"description": "Users can't login on mobile",
"team": "Engineering",
"priority": 2
}
}
Response:
{
"issue": {
"id": "ENG-123",
"url": "https://linear.app/trending-society/issue/ENG-123"
}
}
list_issues
Lists Linear issues.
{
"tool": "list_issues",
"params": {
"team": "Engineering",
"status": "In Progress",
"limit": 20
}
}
trigger_workflow
Triggers an n8n workflow.
{
"tool": "trigger_workflow",
"params": {
"workflow_id": "abc123",
"data": {
"source": "jarvis",
"action": "scrape_instagram"
}
}
}
Response:
{
"execution_id": "exec_789",
"status": "running"
}
MCP Protocol
The gateway implements the Model Context Protocol specification.
Returns available tools and their schemas.
POST /tools/call
Content-Type: application/json
{
"tool": "tool_name",
"params": { ... }
}
Using with Claude
Add to Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"trending-society": {
"url": "https://mcp.trendingsociety.com",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Using with Cursor
Add to Cursor settings:
{
"mcp.servers": {
"trending-society": {
"url": "https://mcp.trendingsociety.com",
"apiKey": "YOUR_API_KEY"
}
}
}
Error Responses
{
"error": {
"code": "TOOL_NOT_FOUND",
"message": "Tool 'unknown_tool' does not exist"
}
}
| Error Code | Description |
|---|
TOOL_NOT_FOUND | Requested tool doesn’t exist |
INVALID_PARAMS | Missing or invalid parameters |
EXECUTION_FAILED | Tool execution error |
UNAUTHORIZED | Invalid API key |
RATE_LIMITED | Too many requests |