MCP Integration
Overview

MCP Integration

Pharlo is a registered MCP (Model Context Protocol) server. This means AI assistants like Claude can operate the API conversationally — publishing content, managing channels, and querying analytics through natural language, without you writing any API calls.


What is MCP?

MCP is an open protocol that lets AI models interact with external services through structured tools. Instead of building a custom AI integration, you connect your MCP-compatible client to the server once, and the AI can use all the capabilities the server exposes.

Think of it as an API — but instead of your code calling it, your AI assistant does.

Your message                 Claude              Pharlo MCP Server
     │                          │                           │
     │── "Upload video" ─►      │                           │
     │                          │── list_connections ─────► │
     │                          │◄── [channels] ─────────── │
     │                          │── get_platform_caps ─────►│
     │                          │◄── {payload schema} ──────│
     │                          │── create_assignment ─────►│
     │                          │◄── {id, status} ──────────│
     │◄── "Done. Job ID: …" ─   │                           │

What you can do via MCP

CapabilityExample prompt
Publish content"Upload this video to my YouTube channel and set it to public"
Schedule posts"Schedule this video for Friday at 6 PM Cyprus time"
Manage channels"Connect my Facebook page to Pharlo"
Check status"What's the status of my last five uploads?"
View analytics"Show me my YouTube subscriber growth over the past 30 days"
Compare channels"Compare views between my two YouTube channels this month"
Update published content"Change the title of the video I uploaded yesterday"
Manage webhooks"Show me recent webhook delivery failures"

All 17 MCP tools are documented in the Tool Reference.


MCP vs REST API

REST APIMCP
CallerYour codeAn AI assistant
AuthAPI key in Authorization headerOAuth 2.1 (PKCE)
FormatJSON over HTTPMCP protocol over SSE/HTTP
Credit costPlan ratePlan rate × 1.2 (20% surcharge)
Use caseServer-to-server, automationAI-assisted workflows, natural language

Supported clients

Claude.ai

The Pharlo MCP server is registered on Claude.ai — connect it from Settings → Integrations with one click. See Connection Setup for step-by-step instructions.

Anthropic SDK (custom agents)

Use the Anthropic SDK to build your own AI agents that connect to the Pharlo MCP server programmatically. Pass an OAuth access token obtained via the MCP OAuth flow.

import anthropic
 
client = anthropic.Anthropic()
 
response = client.beta.messages.create(
    model="claude-opus-4-7",
    max_tokens=1024,
    betas=["mcp-client-2025-04-04"],
    mcp_servers=[
        {
            "type": "url",
            "url": "https://pharlo.io/_mcp",
            "authorization_token": "mcp_at_your_token_here",
        }
    ],
    messages=[
        {
            "role": "user",
            "content": "List my YouTube connections and show the subscriber count for each.",
        }
    ],
)
 
for block in response.content:
    if hasattr(block, "text"):
        print(block.text)

The authorization_token is an OAuth access token — not your ds_live_... API key. Obtain it by completing the MCP OAuth flow. Access tokens expire after 1 hour; use the refresh token to renew them silently.

Other MCP clients

Any client that implements the MCP standard works — including open-source frameworks and other AI platforms. See Connection Setup for the full OAuth 2.1 + PKCE flow and available scopes.


Getting started

Get an API key

You need a ds_live_... key from Settings → Credentials in the console. This key is what you enter on the OAuth consent screen when authorizing the MCP connection.

Connect the server

For Claude.ai, go to Settings → Integrations, add the server URL https://pharlo.io/_mcp, and authorize with your API key.

For custom agents, implement the OAuth 2.1 + PKCE flow described in Connection Setup.

Start prompting

See Workflows for step-by-step prompt patterns and Prompt Tips for getting the best results from the AI.


See also

  • Connection Setup — Claude.ai quick setup and full OAuth flow for custom clients
  • Tool Reference — all 17 tools with parameters and annotations
  • Workflows — end-to-end prompt patterns for common tasks
  • Prompt Tips — how to phrase prompts for reliable results
  • Authentication — API key and JWT auth for direct REST access