Hello MCP Server

Hello MCP Server

A stateless MCP server for Cloudflare Workers that uses createMcpHandler to expose a simple greeting tool, requiring no persistent state.

Category
访问服务器

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, and tweet.write for 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 command npx 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选