LinkedIn Ads MCP

LinkedIn Ads MCP

Provides LinkedIn Ads data and management capabilities to AI assistants via MCP, with LinkedIn SSO authentication and a web-based setup/admin interface.

Category
访问服务器

README

LinkedIn Ads for Claude — product site

Thin front door for the standalone LinkedIn Ads MCP: LinkedIn SSO, one setup screen, and an admin panel. No ads dashboard — that's the separate linkedin-ads-buddy app.

npm install
cp .env.example .env    # fill in the anon key + your product MCP URL
npm run dev             # http://localhost:8080

How it fits together

Shares the Supabase project (bxoxefmenvlxiubynuay) with linkedin-ads-buddy, but not its tables. Two independent systems:

Legacy dashboard This product
Table mcp_api_keys mcp_keys
MCP entrypoint mcp-server/src/server.ts mcp-server/src/server-product.ts
Railway service linkedin-ads-buddy-production separate service
Key → token anon PostgREST select resolve_mcp_key() RPC

Nothing here touches the legacy path. That's deliberate — the old dashboard is a working daily driver and must keep working unchanged.

Routes

Route Auth Purpose
/ — Landing + Sign in with LinkedIn
/auth/callback — Supabase OIDC return; captures provider_token, calls link_mcp_key
/linkedin/callback — Server-side connect return; calls connect_linkedin
/setup session Connection status, MCP key, Claude setup instructions
/admin admin Suspend/activate users, revoke keys, toggle read-only
/privacy, /terms — Placeholders — replace before launch

Setup checklist

Do these in order. Steps 1–2 are the go/no-go.

1. LinkedIn developer app (reuse the existing one — a new app needs fresh Advertising API approval, which takes weeks and can be refused)

  • Products: "Sign In with LinkedIn using OpenID Connect" and "Advertising API". If OIDC is missing, openid is ungrantable and the whole combined-scope request fails. This is the single go/no-go.
  • Auth → Authorized redirect URLs, add (keep the existing ones):
    • https://bxoxefmenvlxiubynuay.supabase.co/auth/v1/callback — Supabase SSO
    • https://<this-site>/linkedin/callback — server-side connect flow
    • http://localhost:8080/linkedin/callback — local dev

2. Check for refresh tokens. Run one live connect and look at what LinkedIn returns. connect_linkedin reports hasRefreshToken. Access tokens last ~60 days; refresh tokens are partner-gated. This single fact decides whether reconnects can ever be made silent, so find out early.

3. Supabase Auth provider — NOT needed.

Sign-in deliberately does not use signInWithOAuth({provider: "linkedin_oidc"}). That would require enabling the LinkedIn provider in the Supabase dashboard, using credentials this project already holds as edge secrets. Instead the flow is:

/  → get_auth_url (scopeSet: "oidc")   → LinkedIn consent
   → /auth/callback?code=…
   → linkedin_signin  (edge, service role)
        exchange code → /v2/userinfo → find-or-create user
        → store ads token in mcp_keys
        → generateLink → one-time hashed_token
   → supabase.auth.verifyOtp({token_hash}) → session

The LinkedIn access token never reaches the browser, and linkedin_oidc can stay disabled. If you ever do enable it, nothing here needs to change.

4. Migrations — run manually in the SQL Editor, in order:

  1. 20260805120000_mcp_product_keys.sql
  2. 20260805120100_resolve_mcp_key_rpc.sql

5. Mint the resolver JWT. Sign {"role":"mcp_server"} with the project JWT secret. Set it as SUPABASE_MCP_JWT on the product Railway service.

6. Deploy the edge function (CI for this is broken — do it by hand):

SUPABASE_ACCESS_TOKEN=<token> npx supabase functions deploy linkedin-api --project-ref bxoxefmenvlxiubynuay

7. New Railway service from the same mcp-server/ folder: startCommand = npm run start:product, plus SUPABASE_MCP_JWT, SETUP_URL, OAUTH_CLIENT_ID, SUPABASE_ANON_KEY.

8. Grant yourself admin. ⚠️ Your existing admin row belongs to the email/password user. Signing in with LinkedIn creates a different auth.users row, and the signup trigger only ever grants 'user' — so you will not have /admin until you run this:

insert into user_roles (user_id, role)
select id, 'admin' from auth.users where email = 'you@example.com'
on conflict do nothing;

Known gaps

  • Legal pages are placeholders.
  • No email nudge before a token expires — the /setup banner is the only warning.
  • Access is self-serve (access_status defaults to 'active'). To require approval, change the column default to 'pending'; the "waiting for approval" screen already exists.
  • No Stripe. profiles.plan / stripe_customer_id are there for it, unused.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选