Hello MCP Server
A stateless MCP server for Cloudflare Workers that uses createMcpHandler to expose a simple greeting tool, requiring no persistent state.
README
Social MCP Portal (Cloudflare Workers)
MCP servers for Instagram, Facebook Pages, X (Twitter), WhatsApp, Google Business Profile, YouTube, Google Ads and Google Analytics (GA4), running as a single stateless Worker via createMcpHandler from the Agents SDK.
Endpoints
| Endpoint | Server | Tools |
|---|---|---|
/mcp |
Social MCP Portal | every tool below, in one endpoint |
/mcp/instagram |
Instagram MCP Server | instagram_* |
/mcp/facebook |
Facebook MCP Server | facebook_* |
/mcp/x |
X (Twitter) MCP Server | x_* |
/mcp/whatsapp |
WhatsApp MCP Server | whatsapp_* |
/mcp/google |
Google MCP Server | all four Google servers below |
/mcp/google-business |
Google Business Profile MCP Server | google_business_* |
/mcp/youtube |
YouTube MCP Server | youtube_* |
/mcp/google-ads |
Google Ads MCP Server | google_ads_* |
/mcp/google-analytics |
Google Analytics MCP Server | ga4_* |
Every endpoint also exposes ping, which reports which credentials are configured — handy for checking the deploy without touching the social APIs.
Tools
Instagram (Graph API — Business/Creator accounts)
| Tool | What it does |
|---|---|
instagram_get_profile |
Profile data (followers, bio, media count) |
instagram_list_media |
Recent posts |
instagram_get_media |
Details of a single post |
instagram_get_media_insights |
Post metrics (reach, likes, saves, shares) |
instagram_publish_post |
Publishes an image or reel (container + publish) |
instagram_list_comments |
Comments on a post |
instagram_reply_to_comment |
Replies to a comment |
Facebook (Pages Graph API)
| Tool | What it does |
|---|---|
facebook_list_pages |
Pages the token can manage |
facebook_get_page |
Page details |
facebook_list_posts |
Recent Page posts |
facebook_create_post |
Publishes a text post (optionally with a link) |
facebook_upload_photo |
Publishes a photo from a public URL |
facebook_delete_post |
Deletes a post |
facebook_get_post_insights |
Post metrics |
facebook_list_comments |
Comments on a post |
facebook_reply_to_comment |
Replies to a comment |
X / Twitter (API v2)
| Tool | What it does |
|---|---|
x_get_me |
Authenticated account |
x_get_user |
Profile lookup by @username |
x_list_user_tweets |
Recent posts from an account |
x_get_tweet |
A single post with its metrics |
x_search_recent |
Search posts from the last 7 days |
x_post_tweet |
Publishes a post (reply/quote supported) |
x_delete_tweet |
Deletes a post |
WhatsApp (Cloud API)
| Tool | What it does |
|---|---|
whatsapp_send_message |
Free-form text (24-hour window only) |
whatsapp_send_template |
Approved template, with body parameters |
whatsapp_send_media |
Image, video, audio or document from a URL |
whatsapp_send_reaction |
Reacts to a message with an emoji |
whatsapp_mark_as_read |
Marks a received message as read |
whatsapp_get_business_profile |
Business profile of the sending number |
whatsapp_list_templates |
Templates of a WABA, with approval status |
whatsapp_get_media_url |
Download URL of received media |
Google Business Profile
| Tool | What it does |
|---|---|
google_business_list_accounts |
Manageable accounts |
google_business_list_locations |
Locations of an account |
google_business_get_location |
Address, hours, phone, categories |
google_business_list_reviews |
Reviews with rating and existing replies |
google_business_reply_to_review |
Replies to a review |
google_business_create_post |
Publishes a local post, with optional CTA |
YouTube (Data API v3)
| Tool | What it does |
|---|---|
youtube_get_channel |
Channel by ID, handle, or the authenticated one |
youtube_list_videos |
Recent videos of a channel |
youtube_get_video |
Video with views, likes and comment count |
youtube_search |
Searches videos, channels or playlists |
youtube_list_comments |
Comment threads on a video |
youtube_reply_to_comment |
Replies to a comment |
youtube_update_video |
Title, description, tags, privacy |
Google Ads
| Tool | What it does |
|---|---|
google_ads_list_accounts |
Accessible accounts |
google_ads_list_campaigns |
Campaigns with status, budget and metrics |
google_ads_campaign_performance |
Daily performance of one campaign |
google_ads_list_ad_groups |
Ad groups of the account or a campaign |
google_ads_keyword_performance |
Keyword metrics, ordered by impressions |
google_ads_run_query |
Arbitrary GAQL query |
google_ads_update_campaign_status |
Pauses/enables/removes a campaign — changes live spend |
Google Analytics (GA4)
| Tool | What it does |
|---|---|
ga4_list_accounts |
Analytics accounts |
ga4_list_properties |
GA4 properties of an account |
ga4_report |
Report with the metrics/dimensions you choose |
ga4_traffic_overview |
Users, sessions, engagement and conversions by channel |
ga4_top_pages |
Most viewed pages |
ga4_realtime |
Users active right now |
ga4_list_metadata |
Metrics and dimensions available on the property |
Credentials
Store them as Worker secrets — never in wrangler.jsonc:
npx wrangler secret put FACEBOOK_ACCESS_TOKEN # Page token (Facebook, and Instagram fallback)
npx wrangler secret put INSTAGRAM_ACCESS_TOKEN # optional; overrides the token above for Instagram
npx wrangler secret put X_BEARER_TOKEN # X app-only token (reads)
npx wrangler secret put X_USER_ACCESS_TOKEN # X user-context token (posting/deleting)
# WhatsApp Cloud API
npx wrangler secret put WHATSAPP_ACCESS_TOKEN # optional; falls back to FACEBOOK_ACCESS_TOKEN
npx wrangler secret put WHATSAPP_PHONE_NUMBER_ID # default sender number ID
# Google (shared by Business Profile, YouTube, Ads and Analytics)
npx wrangler secret put GOOGLE_CLIENT_ID
npx wrangler secret put GOOGLE_CLIENT_SECRET
npx wrangler secret put GOOGLE_REFRESH_TOKEN
# Google, per-product extras
npx wrangler secret put YOUTUBE_API_KEY # optional; used for read-only YouTube calls
npx wrangler secret put GOOGLE_ADS_DEVELOPER_TOKEN
npx wrangler secret put GOOGLE_ADS_LOGIN_CUSTOMER_ID # optional, for MCC accounts
npx wrangler secret put GOOGLE_ADS_CUSTOMER_ID # optional default account
npx wrangler secret put GA4_PROPERTY_ID # optional default property
Google access tokens expire in about an hour, so the Worker mints them on demand from the refresh token and caches them in the isolate. A static GOOGLE_ACCESS_TOKEN is also accepted, which is convenient for local testing but will expire in production.
For local development, put the same keys in a .dev.vars file (git-ignored).
Required permissions:
- Instagram:
instagram_basic,instagram_content_publish,instagram_manage_comments - Facebook:
pages_read_engagement,pages_manage_posts,pages_manage_engagement - X:
tweet.read,users.read, andtweet.writefor publishing - WhatsApp:
whatsapp_business_messaging,whatsapp_business_management - Google Business Profile:
business.manage - YouTube:
youtube.force-ssl(writes); reads can use an API key - Google Ads:
adwords, plus an approved developer token - GA4:
analytics.readonly
The Graph API version defaults to v21.0 and can be changed with the GRAPH_API_VERSION var in wrangler.jsonc.
Any tool called without its credential returns an MCP error result explaining which secret is missing — it never leaks the token value.
Running
npm install
npm start # http://localhost:5173 — built-in tool tester with an endpoint switcher
npm run build # generates dist/ (Worker + client assets)
npm run deploy # build + wrangler deploy
Deploying from Cloudflare Workers Builds
The Vite plugin is what fills in assets.directory — it writes the final Worker config to dist/mcp_social/wrangler.json at build time. So a bare npx wrangler deploy with no build first fails with:
✘ [ERROR] The `assets` property in your configuration is missing the required `directory` property.
In the Workers Builds settings for this project, set either:
- Build command:
npm run build(keeping the default deploy commandnpx wrangler deploy), or - Deploy command:
npm run deploy(which builds and deploys in one step).
Connect an MCP client (Claude, MCP Inspector, …) to https://<your-worker>/mcp, or to one of the per-network endpoints.
Structure
src/
server.ts routing: one MCP server per endpoint
social/
shared.ts HTTP helper, error handling, secret loading
instagram.ts instagram_* tools
facebook.ts facebook_* tools
twitter.ts x_* tools
whatsapp.ts whatsapp_* tools
google-shared.ts Google OAuth: refresh token -> cached access token
google-business.ts google_business_* tools
youtube.ts youtube_* tools
google-ads.ts google_ads_* tools
google-analytics.ts ga4_* tools
env.d.ts secret/var types
client.tsx browser tool tester
Adding a network
Create src/social/<network>.ts exporting a register<Network>Tools(server, env) function, then add it to the SERVERS map in src/server.ts. For a Google product, reuse googleGet/googlePost from google-shared.ts so it shares the token refresh.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.