oferty-spike-mcp
oferty-spike-mcp
Спайк №1 проекта «Oferty Online»: сможет ли встроенный сервер OAuth 2.1 Supabase Auth (бета) сработаться с приложением Claude через Dynamic Client Registration.
Код одноразовый. Никаких тестов, никакой обработки ошибок, кроме того, что диагностирует сам спайк, никаких настоящих инструментов MCP. После выполнения остаётся только заметка с выводами.
Что здесь
Файл | Роль |
| маршрутизация HTTP, валидация |
| сервер MCP v2 + инструмент |
| два пути: статический Bearer (Claude Code) и токен Supabase (приложение Claude) |
| страница согласия — единственное, что мы пишем сами |
| получение метаданных AS при старте, fail fast |
Используем SDK v2 (@modelcontextprotocol/server + @modelcontextprotocol/node).
@modelcontextprotocol/sdk — это устаревшая v1 — большинство туториалов в сети описывают именно её.
Related MCP server: mcp-oauth-server-next
Переменные окружения
Смотри .env.example. Все четыре обязательны, процесс не запустится без них.
Локальный запуск
npm ci
APP_ORIGIN=http://localhost:3000 SUPABASE_URL=https://twoj.supabase.co \
SUPABASE_ANON_KEY=... SPIKE_STATIC_TOKEN=... npm startЭндпоинты
POST /mcp— Streamable HTTP, без состоянияGET /.well-known/oauth-protected-resource/mcp— RFC 9728GET /.well-known/oauth-authorization-server— метаданные Supabase, переданные дословноGET /oauth/consent?authorization_id=…— страница согласияGET /healthz— жизнеспособность процесса, намеренно не пингует Supabase
Диагностика
Без токена POST /mcp отвечает 401 с заголовком WWW-Authenticate, указывающим
на Protected Resource Metadata — по этому ты поймёшь, что ленивая аутентификация работает.
При подозрении на проблему с реконнектом коннектора (самая подозрительная точка спайка)
пригодятся supabase.auth.oauth.listGrants() и revokeGrant({ clientId }) — они позволяют
увидеть и удалить сохранённое согласие, не трогая базу вручную.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Demo banking MCP server: accounts, transactions and payments. OAuth 2.1 with DPoP.
Experimental MCP server for current empirical verification of explicit public HTTPS endpoint claims.
The Stytch MCP server is a reference implementation that demonstrates remote MCP server authentication and authorization using Stytch Connected Apps. It provides OAuth 2.1-compliant authorization (including PKCE), Dynamic Client Registration, and validates Stytch-issued access tokens to enable AI agents to securely interact with external services through permissioned access, supporting scopes like openid, email, profile, and manage:project_data.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude.ai to connect to a Hermes MCP server via OAuth 2.1 authorization code flow with PKCE, acting as a reverse proxy and single-user authorization gateway.-
- FlicenseNot gradedqualityDmaintenanceA proof-of-concept HTTP MCP server requiring OAuth 2.0 authentication before tool use. Demonstrates the full authentication flow with Claude Code, including discovery, client registration, PKCE authorization, and bearer token verification.-
- AlicenseNot gradedqualityCmaintenanceEnables end-to-end testing of OAuth authorization for an MCP server, exposing scoped tools like whoami and echo over streamable HTTP.ISC
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude.ai and Claude Desktop to securely connect to self-hosted OpenClaw assistants through OAuth2-authenticated MCP, supporting chat, health checks, multi-instance routing, and asynchronous task management.614 npmMIT