Skip to content

Comments

Replace Arcade SDK with MCP Gateway#4

Merged
evantahler merged 2 commits intomainfrom
evantahler/arcade-mcp-gateway
Feb 17, 2026
Merged

Replace Arcade SDK with MCP Gateway#4
evantahler merged 2 commits intomainfrom
evantahler/arcade-mcp-gateway

Conversation

@evantahler
Copy link
Contributor

Summary

Swapped from the Arcade SDK (with @arcadeai/arcadejs) to using Arcade's MCP Gateway directly via the OpenAI Agents SDK's native MCP support. This removes the need for ARCADE_API_KEY and USER_ID env vars, replacing them with a single ARCADE_GATEWAY_URL.

Key changes:

  • Upgraded @openai/agents to ^0.4.11 for MCP server support
  • Implemented OAuthClientProvider for Arcade OAuth flow (browser redirect + callback server)
  • OAuth tokens/client info persisted in .context/arcade/ (gitignored)
  • Agent now passes MCPServerStreamableHttp instances instead of toolkit names
  • Config accepts optional gateway URL via env or --gateway-url CLI flag
  • Added bun run clear to remove cached OAuth credentials

All tests pass. The OAuth flow is fully automatic: browser opens for first-time auth, subsequent runs reuse cached tokens with transparent refresh.

evantahler and others added 2 commits February 17, 2026 15:29
- Remove @arcadeai/arcadejs dependency, bumped @openai/agents to ^0.4.11 for native MCP support
- Replaced Arcade API key auth with Arcade OAuth via MCP SDK's OAuthClientProvider
- MCP server stored in .context/arcade/, .gitignored to protect OAuth tokens
- Agent now uses MCPServerStreamableHttp instead of toolkit-based tool loading
- Config.arcade_gateway_url is optional, can be provided via env or --gateway-url CLI flag
- Updated tests to reflect new optional gateway URL requirement
- Auth flow handles OAuth redirect, browser callback, token exchange, and token refresh transparently
- Added `bun run clear` command to remove stored session info

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@evantahler evantahler merged commit acc18cf into main Feb 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant