Viraly MCP Server
OfficialEnables scheduling, publishing, and analyzing Facebook page posts, along with media management and analytics through Viraly.
Allows scheduling, publishing, and analyzing Instagram posts, as well as managing media and captions through the Viraly workspace.
Generates images using DALL-E and saves them to the Viraly media library for use in posts.
Supports scheduling, publishing, and analyzing YouTube content, including media library management and performance metrics via Viraly.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Viraly MCP ServerShow me my top performing campaigns"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Viraly MCP Server
The official Model Context Protocol server for Viraly — connect any MCP-aware AI assistant (Claude Desktop, Claude.ai web, ChatGPT, Cursor, custom agents built on the Anthropic / OpenAI SDKs) directly to your Viraly social-media workspace and let it schedule posts, run analytics, generate captions, and manage every channel you've connected, all in plain language.
First-class MCP support — 32+ tools, full CRUD. Not a read-only sidekick: your AI can create, read, update, and delete across posts, channels, media, analytics, and bio links — bound by the same OAuth scopes and plan limits as the web app.
Available on every Viraly plan, including Free. No API key — sign in once with OAuth and your AI assistant gets scoped, revocable access to your workspace.
Public endpoint:
https://mcp.viraly.io/mcpBeta / staging:
https://mcp.beta.viraly.io/mcpAPI docs: viraly.io/docs
What you can do with it
Once connected, your AI assistant can drive Viraly using natural language:
"Draft three Instagram captions about our spring sale, then schedule the best one for Friday at 9am."
"What were my top-performing LinkedIn posts last month by reach? Export them to CSV."
"Generate a hero image for my next YouTube short and save it to the media library."
"Reschedule everything in the Promo queue from this week to next week."
The MCP server exposes 32+ tools across reading, writing, analytics, and AI generation — see the full tool catalog below.
Quick install
Pick your MCP client. The first time you run any of these, your browser will open to app.viraly.io/oauth/authorize for sign-in and consent. After that, your assistant stays connected.
Claude Desktop / Claude.ai
Add a custom connector pointing to https://mcp.viraly.io/mcp. Follow Anthropic's connector guide.
ChatGPT (Apps & Connectors)
In Settings → Connectors → Add new, paste https://mcp.viraly.io/mcp and follow the OAuth prompt.
Cursor
In ~/.cursor/mcp.json (or your project's .cursor/mcp.json):
{
"mcpServers": {
"viraly": {
"url": "https://mcp.viraly.io/mcp"
}
}
}Claude Code (CLI)
claude mcp add viraly https://mcp.viraly.io/mcp -t httpCustom agents (Anthropic SDK / OpenAI SDK / etc.)
Any MCP-compliant client over Streamable HTTP works. Point it at https://mcp.viraly.io/mcp and complete the OAuth 2.1 flow (PKCE + Dynamic Client Registration are supported per RFC 7591). The discovery doc is at https://mcp.viraly.io/.well-known/oauth-protected-resource.
Tool catalog
32+ tools, grouped by what they do. All tools are scoped — your assistant can only call the ones whose scopes you granted at consent time.
Workspace & discovery
Tool | Purpose |
| Workspace name, plan tier (Free/Influencer/Business/Agency/Enterprise), status. |
| Multi-brand "social set" buckets — useful when an agency manages multiple clients in one workspace. |
| Every connected social account (Instagram, Facebook page, X, LinkedIn, etc.) with its channel id. |
| Content categories / queues configured in the workspace. |
| Saved hashtag bundles. |
| The IANA zone IDs Viraly accepts for scheduling. |
Posts — reading
Tool | Purpose |
| Recommended. Cross-status, paginated, filterable list (social set, channel, status, date range, sort). |
| Convenience: only posts scheduled for the future. |
| Convenience: only posts already published. |
| Convenience: only saved drafts. |
| Full details for a single post — caption, attachments, status, schedule, metrics, error. |
Posts — writing
Tool | Purpose |
| Schedule a post (specific time or next queue slot). Single channel per call; loop for multi-channel. |
| Save a draft without scheduling. |
| Edit an existing post — caption, schedule, attachments, category. |
| Lighter alternative to |
| Immediately publish a draft or scheduled post, bypassing the schedule. |
| Cancel a scheduled post or delete a draft. |
Media
Tool | Purpose |
| Browse a media-library collection. |
| Pull a remote URL into the media library and return an |
Analytics
Tool | Purpose |
| Metrics for a single post (likes, comments, shares, reach, impressions, saves, views). |
| Per-post analytics for a channel, sortable by metric — perfect for "top 10 by reach". |
| High-level channel stats (currently post count). |
| Refresh metrics from the platform's API on demand. |
| Base64 CSV export of per-post analytics for any channel + date range. |
AI generation
Tool | Purpose |
| Generate or transform a caption (write-new, rephrase, shorten, expand, casualize, formalize). |
| Generate a relevant hashtag set for a topic or caption. |
| Generate an image (DALL-E) and save it to the media library. HD requires Business+. |
Bio links
Tool | Purpose |
| List the link-in-bio pages you own. |
| Paginated email/phone subscribers for a bio-link page — feeds outbound automations. |
Utilities
Tool | Purpose |
| Open Graph fetch (title, description, image) for a URL — useful when composing link cards. |
Workspace management
Tool | Purpose |
| Change a social set's default timezone. |
| Destructive. Permanently disconnect a channel. Requires |
OAuth scopes reference
When your assistant connects, it asks for a set of scopes. You can grant a subset; the assistant will get scope-error responses for tools that need anything you withheld.
Scope | Grants |
| List/get posts and their metadata |
| Schedule, create, update, reschedule, publish, cancel posts; AI generation |
| List channels, channel stats |
| Disconnect channels, trigger analytics sync |
| Post + channel analytics, insights, CSV export |
| List media library |
| Upload media, generate AI images |
| List social sets |
| Update social-set timezone |
| List categories |
| List hashtag groups |
| List bio-link pages |
| List bio-link subscribers |
| Workspace name, plan, status |
Revoke at any time from Settings → Connected Apps in the Viraly SPA.
Self-hosting
The hosted endpoint at mcp.viraly.io is what every consumer should use. This section is for users who want to run their own copy (security audits, air-gapped corporate deployments, dev work on the server itself).
git clone https://github.com/viraly-io/viraly-mcp-server.git
cd viraly-mcp-server
npm install
npm run build
VIRALY_API_ORIGIN=https://api.viraly.io \
VIRALY_OAUTH_ISSUER=https://api.viraly.io \
MCP_PUBLIC_ORIGIN=https://localhost:8080 \
MCP_TRANSPORT=http \
PORT=8080 \
npm startFor stdio mode (single-user CLI tools that already have a vat_* access token):
VIRALY_ACCESS_TOKEN=vat_yourtoken \
MCP_TRANSPORT=stdio \
node dist/server.jsEnvironment variables
Var | Default | Notes |
|
|
|
|
| HTTP transport only |
|
| Upstream Platform API |
| (= | Issuer URL for OAuth metadata |
|
| This server's public URL |
| (empty) | Comma-separated allowed origins |
|
| pino level |
|
| Per-token cap |
| (none) | If set, |
| (none) | stdio transport only |
HTTP endpoints
Method | Path | Auth | Notes |
GET |
| none | Liveness probe |
GET |
| optional bearer | Prometheus exposition |
GET |
| none | |
POST |
| Bearer | MCP JSON-RPC |
GET |
| Bearer | SSE event stream |
DELETE |
| Bearer | Session termination |
Architecture
MCP client ──OAuth 2.1 + PKCE──▶ Viraly .NET API (api.viraly.io)
│ ▲
│ │ Bearer vat_* (forwarded)
│ Streamable HTTP / stdio │
└─▶ Viraly MCP server (mcp.viraly.io)
├─ Tool registry (read + write)
├─ OAuth resource-server middleware
└─ Pass-through to Platform API (/api/platforms/*)The server is a thin proxy that exposes LLM-friendly tool schemas. Authentication and authorization are delegated to the Viraly API — every tool call forwards the user's vat_* access token upstream and lets the API enforce scopes and plan limits exactly as it does for the SPA. There's no shared key, no privileged service account, and no way for one user's tokens to access another tenant's data.
Repo layout
src/
server.ts entry point
config.ts env-var loading + validation
auth/
middleware.ts Bearer-token auth for HTTP transport
token-context.ts AsyncLocalStorage for per-request token
api/
viraly-client.ts Platform API client (typed)
errors.ts error taxonomy
tools/
registry.ts register/dispatch framework
types.ts ToolDefinition interface
index.ts aggregated tool imports
read/ read-only tools
write/ state-changing tools (also AI generation)
transport/
http.ts Streamable HTTP transport
stdio.ts stdio transport
observability/
logger.ts pino logger (auth headers redacted)
metrics.ts prom-client metricsTroubleshooting
Browser shows "ruffled feathers" / generic error after sign-in.
You may be on a stale SPA bundle — hard-refresh app.viraly.io (Cmd-Shift-R / Ctrl-Shift-R) and retry the OAuth flow.
Tool returns "Plan limit reached".
You hit a quota gate (e.g. generate_image on Free plan). Upgrade at viraly.io/pricing or pick a tool that doesn't require the gated capability.
Tool returns "additional permission" / scope error. The original consent didn't grant the scope this tool needs. Open Settings → Connected Apps, revoke, then re-add the connector and grant the missing scope.
MODEL_VALIDATION_FAILED from any tool.
File an issue with the tool name and (redacted) input — that error means the MCP server's request shape is out of sync with the API. We try to catch these in CI but the surface is large.
Token expired. Most clients auto-refresh. If yours doesn't, reconnect — the OAuth flow only takes a few seconds.
Security
See SECURITY.md for the disclosure policy and the threat model.
Highlights:
OAuth 2.1 + PKCE; no shared keys, no service accounts.
Per-tool scopes + plan-tier checks enforced by the Viraly API, not by this server.
Authorization headers and OAuth tokens are redacted in logs.
All container deploys are pinned by SHA, not tag, in CI.
License
MIT — see LICENSE.
Links
Pricing — MCP is included on every plan
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/viraly-io/viraly-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server