Workboard MCP

Workboard MCP

Enables interaction with Workboard through MCP tools, with OAuth authentication, token management, and support for all 63 documented Workboard API operations.

Category
访问服务器

README

Workboard MCP

Containerized MCP server for Workboard, built with SST, ECS Fargate, Hono, Better Auth, Postgres, Drizzle, and generated npx api Workboard clients.

What Is Included

  • SST aws.Service Hono API running on ECS Fargate behind an ALB, fronted by an SST aws.Router.
  • Router WAF protection with AWS managed rules, IP rate limiting, and blocked-request logs.
  • Cloudflare DNS for workboard-mcp.praxismedicines.dev in production and <stage>.workboard-mcp.praxismedicines.dev for non-production stages.
  • Aurora PostgreSQL Serverless v2 with min: 0 ACU and local Postgres dev settings.
  • Drizzle ORM and Drizzle Kit migrations for Better Auth tables and application tables, with schemas split under packages/core/src/db/schema/.
  • A deploy-time SST migrator Lambda that runs checked-in Drizzle migrations during non-dev deploys.
  • Better Auth OAuth Provider for MCP OAuth 2.1, with internal Entra login through the generic OAuth plugin.
  • A post-login Workboard token step that verifies the personal Workboard token and stores it encrypted with AES-256-GCM.
  • Generated Workboard v1 and v2 SDKs under .api/apis/*, plus generated MCP tool metadata for all 63 documented operations.

Local Setup

npm install
cp .env.example .env
npm run generate:workboard

Fill in .env with Entra credentials and strong local secrets.

Start Postgres:

npm run db:local

In another terminal, apply migrations and start Hono:

npm run migrate
npm run dev

The local API listens on http://localhost:3000. sst dev starts the Hono service locally through npm run dev and skips the deployed HTTPS Router, WAF, and custom domain.

Useful Commands

npm run generate:workboard  # refresh Workboard specs, npx api SDKs, and MCP tool metadata
npm run auth:generate       # refresh the generated Better Auth Drizzle schema
npm run db:generate         # refresh auth schema, then create a Drizzle migration
npm run db:check            # verify Drizzle migration snapshots and SQL
npm run migrate             # apply Drizzle migrations for auth and app tables
npm run typecheck
npm test

Deploy Prerequisites

Set SST secrets:

npx sst secret set BetterAuthSecret "..."
npx sst secret set WorkboardTokenEncryptionKey "..."
npx sst secret set EntraClientId "..."
npx sst secret set EntraClientSecret "..."
npx sst secret set EntraTenantId "..."

Append --stage <stage> to those commands when preparing a non-default SST stage.

Set Cloudflare provider environment variables before deploy:

export CLOUDFLARE_API_TOKEN=...
export CLOUDFLARE_DEFAULT_ACCOUNT_ID=...

Deploy:

npx sst deploy

Router URLs are stage-aware. production and prod use https://workboard-mcp.praxismedicines.dev; every other SST stage uses https://<stage>.workboard-mcp.praxismedicines.dev after the stage name is normalized for DNS. Deployed stages also create an HTTPS ALB origin at origin.<public-domain> for CloudFront to reach the ECS service. The ECS service listens on port 3000, and the load balancer health-checks /health.

Register an Entra redirect URI for each stage host: <public-base-url>/api/auth/oauth2/callback/microsoft-entra-id.

Non-dev deploys run the WorkboardDatabaseMigrator Lambda before the ECS service update. It copies the checked-in drizzle/ folder into the function package and applies unapplied migrations with Drizzle's node-postgres migrator. Drizzle migration metadata is stored in drizzle.__drizzle_migrations; the application and auth tables are created by the SQL migrations in the default PostgreSQL schema.

OAuth Flow

MCP clients discover /.well-known/oauth-protected-resource, then use Better Auth’s OAuth Provider endpoints under /api/auth/oauth2/*.

The user flow is:

  1. MCP OAuth redirects to /oauth/login.
  2. /oauth/login starts generic OAuth with Microsoft Entra (microsoft-entra-id).
  3. After Entra, Better Auth resumes /api/auth/oauth2/authorize.
  4. If no Workboard token is stored, Better Auth redirects to /oauth/workboard-token.
  5. The token is verified with Workboard GET /user, encrypted, and stored in Postgres.
  6. Better Auth continues to /oauth/consent, then issues the OAuth code/token for the MCP client.

References

  • Workboard API docs: https://apidocs.myworkboard.com/
  • SST Aurora: https://sst.dev/docs/component/aws/aurora/
  • SST Service: https://sst.dev/docs/component/aws/service/
  • SST Router: https://sst.dev/docs/component/aws/router/
  • SST Router WAF: https://sst.dev/docs/examples/#router-with-waf
  • Better Auth OAuth Provider: https://www.better-auth.com/docs/plugins/oauth-provider
  • Better Auth Drizzle adapter: https://www.better-auth.com/docs/adapters/drizzle
  • Drizzle Kit migrations: https://orm.drizzle.team/docs/drizzle-kit-migrate
  • SST Drizzle migrations in CI/CD: https://sst.dev/docs/examples/#drizzle-migrations-in-cicd
  • MCP tools: https://modelcontextprotocol.io/specification/draft/server/tools

推荐服务器

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

官方
精选