Skip to main content
Glama

swu-mcp

Remote MCP server for Star Wars: Unlimited deck building, on Cloudflare Workers. Card data comes from the public swu-db.com API. Read-only, no auth, no secrets.

Deploy

Needs Node 22+ and a free Cloudflare account.

npm install
npx wrangler login
npx wrangler deploy

Wrangler prints a URL like https://swu-mcp.<your-subdomain>.workers.dev. The connector URL is that plus /mcp.

In a dev container

Open the folder in VS Code and choose "Reopen in Container" (needs Docker and the Dev Containers extension). npm install runs automatically. Then, in the container terminal:

npx wrangler login     # port 8976 is forwarded for the browser callback
npx wrangler deploy
claude                 # Claude Code CLI, log in on first run

Logins are kept in named volumes, so they survive rebuilds.

To skip wrangler login, create a Cloudflare API token ("Edit Cloudflare Workers" template) and set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID as environment variables on the host (on Windows: user environment variables). Restart VS Code and rebuild the container; devcontainer.json passes them through, so they never touch a file in the repo.

Related MCP server: tcgplayer-api-mcp

CI/CD (GitHub Actions)

.github/workflows/ci.yml runs on every pull request and every push to main: secret detection (gitleaks), lint + type-check, unit tests, build (wrangler deploy --dry-run). On pushes to main, if all four pass, it deploys.

One-time setup, in the GitHub repo settings:

  1. Create a Cloudflare API token with the "Edit Cloudflare Workers" template.

  2. Add repository secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID.

  3. Optional: add a required reviewer to the production environment, to get a manual approval gate before each deploy. The first deploy run creates the environment if it doesn't exist; repository secrets work in it as-is.

Secret detection needs no setup for a repo owned by a personal account. If the repo is owned by an organization, gitleaks-action also needs a GITLEAKS_LICENSE secret (free key from gitleaks.io) and the workflow must pass it to the action.

Add to Claude

Add a custom connector in Claude's connector settings with the /mcp URL. No auth fields needed.

Tools

  • search_cards - full swu-db query syntax (aspects, cost, traits, keywords, rules text, format)

  • get_card - one card in full, by id (SOR_010) or name

  • list_sets - set codes and release dates

  • check_deck - Premier legality, aspect penalties, curve and breakdowns, price, SWUDB import JSON

Local

npm run dev        # http://localhost:8787/mcp
npm test           # deck logic unit tests
npm run typecheck
npm run lint
npm run build      # bundle without deploying

Notes

  • check_deck covers Premier only. It does not check rotation or suspensions, or base/leader text that changes deck-building rules.

  • Responses from swu-db are cached for 6 hours where the Workers Cache API is active.

  • The URL is public. It only proxies public card data, but anyone with the URL can call it.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Live TCG card and decklist prices for AI assistants. 22+ games, no account, ready-to-buy links.

      https://mcp.tcgmcp.com/mcp
    • Look up Pokemon TCG Pocket cards, sets, packs, and evaluate decks with battle simulations.

    • SuperCatch connects your AI assistant to a trading-card and collectibles marketplace and your own SuperCatch account or approved stores. Search public cards and collectibles, inspect current offers and seller storefronts, and find cited setup and help documentation without signing in. Connect through SuperCatch OAuth to read your purchases, watchlist membership, saved searches, recorded collection items and support cases. Approved sellers can inspect their listings, stock, low-stock items, orders, sales activity, imports and integration health, subject to current permissions. For supported changes, request the exact action you intend. Depending on consent, permissions and native readiness, tools can manage account watchlist membership and saved searches or prepare supported pricing, inventory, stock-receipt, photo-draft, listing-submission, marketplace-publication, first-shipment, tracking-correction, import-resume and support workflows. Preparation does not execute a change. Actions requiring native approval provide a SuperCatch review link and execute only the approved frozen scope. Price changes require exact confirmation or bound native approval according to the selected tool. A shipment or tracking action does not authorize a label purchase, payment or refund. Private results stay within the connected account and approved-store access. A tool appearing in discovery does not grant permission to call it. After an uncertain response, inspect the original operation and reuse its original idempotency key where documented; do not create a replacement intent to bypass recovery. Preview tools do not activate recurring automation. Connect using Streamable HTTP at https://supercatch.com/api/mcp. Setup: https://supercatch.com/ai. Help: https://supercatch.com/help. Support: support@supercatch.com. Review or revoke OAuth access in SuperCatch Account Settings > Connected Apps. Prices and availability can change; inspect the linked source before acting. Official connector repository: https://github.com/empline/supercatch-mcp.

      https://supercatch.com/api/mcp
    • Find trading card printings and search recent sales

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides access to TCGplayer trading card data, including search, product details, pricing, and market information, enabling natural language queries for card analysis.
      1
      -
    • F
      license
      A
      quality
      D
      maintenance
      Provides AI assistants with real-time access to Magic: The Gathering card data, prices, rulings, search, and synergy discovery via the Scryfall API.
      5
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables assistants to search and look up Riftbound TCG cards, list sets, and search or fetch public decklists (resolving stored card UUIDs into real card names) through the community card database's API, so questions about cards absent from model training data can be answered with real data.
      5
      MIT