Paxaver MCP Server
Enables AI assistants to interact with the Paxaver school lunch platform, allowing users to check menus, order lunch, manage wallet funds, register for events, donate, and perform administrative tasks like managing restaurants and menu items.
README
Paxaver MCP Server
AI-facing adapter over the Paxaver school community platform. Implements the Model Context Protocol (MCP) on Cloudflare Workers with RS256 JWT validation, capability-first authorization, and Streamable HTTP transport.
What this is
The Paxaver MCP server lets AI assistants (ChatGPT, Claude, Perplexity, and any MCP-compatible client) act on behalf of a Paxaver user: check a lunch menu, order lunch, top up a wallet, register for fundraising events, donate to a school, volunteer, and — for school administrators — manage restaurants, menu items, events, and daily orders.
It is a thin adapter. It contains no business logic and never touches the database, Stripe, or email directly. Every action is delegated to the private Paxaver backend API over a Cloudflare service binding (same region, no public network hop). The MCP server's only responsibilities are:
- MCP protocol handling (JSON-RPC 2.0, Streamable HTTP)
- RS256 JWT validation via JWKS from the centralized Paxaver auth worker
- Per-tool capability policy and role gating
- Sanitized, user-safe error mapping
Authentication is handled by the Paxaver auth worker (auth.paxaver.com), which
serves as the OAuth 2.0 / OIDC authorization server. The MCP server validates
the resulting RS256 JWTs and forwards them to the backend. The MCP server itself
is not an authorization server.
Architecture
┌───────────────┐ MCP (Streamable HTTP) ┌──────────────────────┐
│ AI Client │ ─────────────────────────────▶ │ Paxaver MCP Worker │
│ ChatGPT/Claude│ ◀───────────────────────────── │ (this repo) │
│ /Perplexity │ RS256 JWT + JSON-RPC 2.0 │ Hono + jose │
└───────────────┘ └──────────┬───────────┘
│
Cloudflare service binding
(PAXAVER_API, same region)
│
▼
┌──────────────────────┐
│ Paxaver API Worker │
│ (private backend) │
│ D1 · Stripe · SES │
└──────────────────────┘
The MCP worker never binds D1, Stripe, or SES. The service binding carries a
short-lived JWT (120s TTL, audience paxaver-internal) that the backend trusts as
an internal call while still attributing the action to the authenticated Paxaver
user. See docs/architecture.md for the full picture.
Quick start
Install
npm install @paxaver/mcp
Develop locally
# 1. Install dependencies (Node >= 22)
npm install
# 2. Configure local secrets
cp .dev.vars.example .dev.vars # then fill in JWT_SECRET, OAUTH_STATE_SECRET, ...
# 3. Run the worker locally (Miniflare)
npm run dev
# 4. Typecheck, lint, and test
npm run typecheck
npm run lint
npm test
The local dev server starts on http://localhost:8787. Discovery endpoints live
under /.well-known/; the MCP endpoint is POST /mcp.
Note: Local development without the
PAXAVER_APIservice binding falls back to authenticated HTTPS againstAPI_BASE_URL(defaulthttp://localhost:8787). For full integration testing, run the Paxaver backend worker locally and pointAPI_BASE_URLat it.
Deployment
Two environments, each a separate Worker with its own custom domain:
| Environment | Worker name | Domain |
|---|---|---|
staging |
paxaver-mcp-staging |
mcp.paxaver.dev |
production |
paxaver-mcp |
mcp.paxaver.com |
The production worker serves both CA and US users through a single endpoint
(mcp.paxaver.com). User region is resolved from the JWT tenant_id claim,
and the worker routes to the correct regional backend via service bindings
(PAXAVER_API_CA, PAXAVER_API_US). Currency is determined by the user's
school, not by the MCP endpoint.
npm run deploy:staging # wrangler deploy --env staging
npm run deploy:prod # wrangler deploy --env production
Secrets must be set with wrangler secret put --env production:
JWT_SECRET, OAUTH_STATE_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET,
CHATGPT_VERIFY_TOKEN. See docs/deployment.md.
Tools
The server exposes 31 tools grouped into six categories. Visibility in
tools/list is filtered by the caller's roles; every call is re-authorized
before dispatch, and the backend re-checks data-level access (defense-in-depth).
| Category | Tools |
|---|---|
| User / account | get_user_info, update_student |
| Wallet | get_wallet_balance, get_wallet_status, add_funds, top_up_balance, donate_to_school |
| Orders & menu | order_lunch, get_orders, get_daily_menu, get_updates, get_daily_orders, get_monthly_orders, get_published_menu, create_draft_order, finalize_order, cancel_order |
| Events | get_upcoming_events, create_event, update_event, cancel_event, register_event, request_volunteer |
| Admin / restaurant | list_school_restaurants, create_restaurant, list_menu_items, create_menu_item, update_menu_item, set_menu_item_price, delete_menu_item, set_daily_menu |
Financial and destructive tools are labeled and require user confirmation. Full
reference: docs/tools.md. Authorization policy:
docs/authorization.md.
Documentation
| Document | Topic |
|---|---|
| docs/architecture.md | System architecture, service binding boundary, regional isolation |
| docs/authentication.md | JWT validation, JWKS, auth worker delegation, token format |
| docs/authorization.md | Capability policy table, role gating, defense-in-depth |
| docs/tools.md | Full tool reference with input schemas and classifications |
| docs/deployment.md | Wrangler config, environments, secrets, custom domains |
| docs/security.md | Security model, CORS, CSRF, error sanitization, headers |
| docs/compatibility.md | MCP protocol version, transports, supported AI clients |
| docs/migration.md | Migration from the legacy mcp-server/ in the private monorepo |
| CHANGELOG.md | Release history |
| SECURITY.md | Vulnerability reporting policy |
| CONTRIBUTING.md | Development setup and contribution process |
Tech stack
- Runtime: Cloudflare Workers (
compatibility_date: 2026-08-01,nodejs_compat) - Framework: Hono v4
- JWT: jose v6 (RS256 via JWKS)
- Protocol: MCP
2025-06-18, Streamable HTTP - Auth: RS256 JWT validation via centralized auth worker (
auth.paxaver.com) - Build/deploy: Wrangler v4
- Test: Vitest v2 (Workers pool + Node pool)
License
Apache-2.0. Copyright (c) 2026 Smartoire. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。