upwork-mcp

upwork-mcp

MCP server for the Upwork GraphQL API enabling job search, contract management, proposal drafting, and other Upwork automation tasks via natural language.

Category
访问服务器

README

upwork-mcp

Best-in-class full-featured MCP server for the Upwork GraphQL API.

Built with the Cloudflare Agents SDK + McpAgent for a stateful, durable, production-ready remote MCP server.

Features

  • 20+ high-level tools for jobs (search + details), contracts, offers, milestones, proposals, messaging (rooms/stories), profiles, talent search, organizations, time reports, ontology (skills/categories), work diary, transactions, etc.
  • Power tool: execute_upwork_graphql for any custom query/mutation with safety elicitation on writes.
  • Resources: upwork://me/profile, upwork://me/contracts (and easily extendable).
  • Prompts: draft_proposal, analyze_contract (Claude can auto-load data + write guided output).
  • Elicitation: Interactive confirmation for high-stakes actions (create offer, raw mutations).
  • Full OAuth2 for Upwork: connect_upwork / disconnect, auto token refresh, per-MCP-user storage.
  • Organization / Tenant support: list_organizations + set_default_tenant (sends correct X-Upwork-API-TenantId).
  • Secure by default: MCP clients must complete OAuth 2.1 flow against the server (via workers-oauth-provider) before calling tools. props carry user identity.
  • Stateful + durable: Built on Durable Objects + SQLite (via McpAgent). KV for tokens/prefs (easy to swap).
  • Rate-limit aware (300/min per IP documented by Upwork), friendly errors, ToS note about caching (≤24h).

Quick Start (Local)

npm install
# Set secrets (create an Upwork dev app first!)
npx wrangler secret put UPWORK_CLIENT_ID
npx wrangler secret put UPWORK_CLIENT_SECRET

npm run dev

In another terminal, test with the inspector (after you complete MCP OAuth + Upwork connect):

npx @modelcontextprotocol/inspector@latest
# Connect to http://localhost:8787/mcp  (you will be guided through OAuth)

Upwork App Setup (required)

  1. Go to https://www.upwork.com/developer/keys/apply (or /developer)
  2. Create OAuth 2.0 app under the correct org context.
  3. Important: Set a Redirect URI that matches exactly what the server will use, e.g.:
    • Production: https://upwork-mcp.your-subdomain.workers.dev/upwork/callback
    • For local testing: use a public HTTPS tunnel (cloudflared, ngrok) pointing at your local /upwork/callback and register that URL.
  4. Select scopes during key creation (and again at runtime via the connect tool). See recommended set in the code (DEFAULT_UPWORK_SCOPES) and SCOPES.md in similar clients.
  5. The key will be reviewed by Upwork (profile requirements apply: real photo, address, clear intended use, reasonable volume).

After approval, store the Client ID + Secret as wrangler secrets (above).

KV Setup (tokens & prefs)

npx wrangler kv namespace create UPWORK_TOKENS
npx wrangler kv namespace create UPWORK_TOKENS --preview
# Copy the output ids into wrangler.jsonc (replace the placeholder 0000... values)

Then npm run dev (local KV works automatically) or npm run deploy.

Connecting from Claude Code / other MCP clients

Remote MCP servers are connected via URL + the OAuth flow exposed by this server (/authorize, /token, /register).

After the MCP client has a valid token for this server, call the connect_upwork tool inside a conversation. It returns a link — open it, log into Upwork, authorize the scopes, and you'll be redirected to a success page. Then Upwork tools light up for that user.

Each MCP-authenticated user gets isolated Upwork tokens.

Architecture Notes

  • UpworkMCP extends McpAgent → per-session durable state + embedded SQLite.
  • OAuthProvider wraps the /mcp handler + provides the standard OAuth endpoints for clients.
  • Upwork tokens live in the UPWORK_TOKENS KV (keyed by MCP userId from props).
  • All GraphQL calls go through a small helper that injects Bearer + optional X-Upwork-API-TenantId and does transparent refresh.
  • Temp OAuth states for the Upwork leg also live in KV (short TTL).

Limitations (Upwork side)

  • The public GraphQL API is read-heavy for many freelancer actions.
  • Submitting proposals (spending Connects) and certain write actions that Upwork wants to rate-limit are either missing from the schema or intentionally restricted ("coming soon" scopes exist).
  • You cannot (and should not) use this to spam applications.
  • Caching policy: Upwork ToS prohibits caching data > 24 hours in most cases.

Deploy

npm run deploy
# Update the redirect URI constant in src/index.ts (buildRedirectUri) + re-deploy if you changed the worker name/subdomain.
# Update the KV ids in wrangler.jsonc with the real ones from `wrangler kv namespace create`.

Environment / Secrets

  • UPWORK_CLIENT_ID, UPWORK_CLIENT_SECRET (wrangler secrets)
  • UPWORK_TOKENS KV binding

Development Tips

  • npm run dev + inspector is the fastest loop.
  • Use the execute_upwork_graphql tool + the official docs (https://www.upwork.com/developer/documentation/graphql/api/docs/index.html) or the generated client (muhammedaksam/upwork-node) to discover more operations and exact variable shapes.
  • Add new high-level tools following the existing pattern (load tokens + prefs tenant, call helper, return text content).
  • For even richer clients, you can expose more of the 75 queries / 52 mutations surfaced by community generators.

Credits & Disclaimer

Unofficial. Not affiliated with Upwork. Comply with Upwork's API Terms of Use (https://www.upwork.com/legal#api) and rate limits.

Built following the Cloudflare "build-mcp" skill / Agents SDK patterns for remote MCP servers.

Next Steps / Polish Ideas

  • Dynamic redirect URI (derive from the original request that triggered connect, or a user setting).
  • Richer structured content responses (instead of just text JSON dumps).
  • Background scheduled jobs per user (e.g. new job alerts via workflows + push/email).
  • Better consent UI for the MCP OAuth leg (copy advanced patterns from agents examples + add CSRF/approved clients).
  • Optional D1 or SQLite user prefs instead of KV for everything.

PRs welcome.


Run npm run dev, connect, connect_upwork, and start automating your Upwork life responsibly.

推荐服务器

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

官方
精选