Skip to main content
Glama
Tarot MCP Server

Tarot MCP Server

by fzlzjerry

Tarot MCP

A bilingual tarot reading service and visual card table, built with TypeScript, React and Vite. It includes a complete 78-card Rider–Waite–Smith deck, original Midnight Art Nouveau artwork, 25 built-in spreads, and daily, moon-phase and custom readings.

Write a question, start each shuffle yourself, cut the current deck, and choose face-down cards in order. Confirmation keeps the table visible and retries the same selection; it never silently draws replacement cards. Reveal the cards individually before the overall interpretation appears. In an embedded MCP App, the reader can then explicitly hand the reading to the host conversation; a host that only stages that message says so instead of claiming it was sent. The standalone Web page keeps the server's local interpretation and does not claim to send it anywhere.

Run locally

Requires Node.js 20.19 or later and npm.

npm ci
npm run start:http -- --host 127.0.0.1

npm ci runs the package's prepare build. Open the card table. To rebuild after changes:

npm run build

For server development, npm run dev:http -- --host 127.0.0.1 executes the TypeScript source. Rebuild the UI with npm run build:ui after frontend edits; these commands do not start a Vite development server or hot reload the page.

Related MCP server: Tarot MCP Server

Which protocol is this?

Surface

Implementation

Entry point

MCP server

Official MCP SDK; stdio, Streamable HTTP and legacy SSE

node dist/index.js, /mcp, /sse

MCP Apps

Official Apps SDK; single-file embedded React UI

ui://tarot-mcp/visual-reading.html

Browser WebMCP

Experimental imperative provider using document.modelContext.registerTool()

/draw/ in a supporting browser

HTTP API

Express routes used by the standalone web page

/api/visual-readings and /api/tools/:toolName

WebMCP is a Community Group draft, not a finalized W3C Standard. The browser provider follows the September 4, 2026 draft's registration surface and also handles Chrome 152's execution callbacks. Unsupported browsers retain the manual card table. MCP Apps and an HTTP MCP endpoint alone are not WebMCP. See the WebMCP implementation notes for the source references, exposed tools, browser differences and verification instructions.

Connect an MCP client

For a local checkout, use the absolute built entry path:

{
  "mcpServers": {
    "tarot": {
      "command": "node",
      "args": ["/absolute/path/to/tarot-mcp/dist/index.js"]
    }
  }
}

For a client accepting a remote Streamable HTTP URL, use http://127.0.0.1:3000/mcp. If MCP_AUTH_TOKEN is configured, supply its Bearer authorization header. The web page accepts the same token under Connection settings and stores it only in the current browser tab's session storage.

An MCP Apps client renders the table in its conversation. For local stdio clients without Apps support, the default browser fallback opens a temporary loopback page for the same pending draw. The original tool call stays pending until the user confirms, allowing the conversation to continue with the result. HTTP/SSE servers do not open a browser on the server machine.

Client and environment configuration covers Cursor, ChatWise's long-running option, browser fallback modes, session persistence, authentication and origin/host allowlists.

Code map

Location

Responsibility

src/tarot/cards/

Canonical deck, card validation, search, analysis and formatting

src/tarot/readings/

Spreads, reading interpretation, visual draw lifecycle and sessions

src/tarot/shared/

Domain types, shared visual input schema, localization and utilities

src/mcp/handlers/

Tool implementations calling the domain services

src/mcp/protocol-server.ts

MCP protocol, Apps capabilities and browser handoff delivery

src/mcp/http-server.ts

HTTP listener, middleware and public static assets

src/mcp/http/

REST routing, MCP transport sessions and JSON-RPC errors

ui/src/useDrawSession.ts

Async requests, cancellation, retries and reading transitions

ui/src/DrawApp.tsx

Card selection, animation state and stage composition

ui/src/webmcp/

Browser feature detection, tool registration and live page access

ui/src/styles/

Ordered styles for setup, controls, ritual, draw, reading and responsive behavior

assets/cards/

Web and MCP artwork variants, manifest and QA evidence

scripts/art/

Reproducible artwork processing and verification

Original PNGs, artwork provenance and QA files are retained because they are inputs or evidence for the deck pipeline. Full-resolution sources and contact sheets are excluded from the distributable build; they are not duplicate runtime assets. See the artwork workflow.

Checks

npm run build          # Server, Web UI, self-contained MCP App and assets
npm run test:all       # Domain, transport, UI and WebMCP regression tests
npm run lint
npm run verify:build   # Deck integrity and packaged asset checks

npm run test:coverage measures the server suite. Transport tests need permission to listen on loopback ports and create local IPC sockets.

The UI suite covers selection order, cut/shuffle behavior, confirmation retries, reveal and details, localization, host handoff, and WebMCP lifecycle/cancellation. Native browser checks are described in WebMCP verification.

Deploy

The personal ChatGPT deployment uses the official Secure MCP Tunnel, not a public endpoint or directory submission. The base Compose listener is restricted to 127.0.0.1:3000; the tunnel override adds container-to-container Bearer auth and the pinned ghcr.io/openai/tunnel-client:v0.0.14 image on the project network.

On the chosen server, with Docker running, Compose v2 or newer, curl, and the GitHub CLI available:

cp -n .env.example .env
# Fill the three values privately in .env; do not commit or print the file.
gh attestation verify oci://ghcr.io/openai/tunnel-client:v0.0.14 -R openai/tunnel-client && \
bash deploy.sh

Stop if provenance verification fails. deploy.sh validates required variables without printing resolved secrets, builds without first taking the service down, and checks tarot health followed by private tunnel readiness. Readiness is not proof that ChatGPT has discovered or used the connection.

See private ChatGPT setup for the runtime-key/organization/workspace requirements, No Authentication connection, refresh procedure, and verification commands. Use the local Web page or your own SSH local forwarding; this configuration does not publish /draw to the internet. The named tarot-sessions volume preserves reading history. Pending draws remain process-local and are lost on restart; the UI asks the reader to start again instead of retrying an invalid deck indefinitely.

Claude connects to the same container through a TLS reverse proxy instead of the OpenAI tunnel. Its custom connectors take a URL with no header field, so the proxy publishes one unguessable path that maps to /mcp and injects the Bearer token; every other path on that hostname returns 404. See private Claude connector for the proxy requirements, buffering constraints and the host-side widget rendering caveats.

Further documentation

Code is licensed under MIT. Artwork has its own documented provenance and licensing terms.

Available Tools

14 tools
create_custom_spreadA

Create a custom tarot spread and draw cards for it. Use this when no existing spread fits your needs and you want to create your own layout with specific positions and meanings.

Inputs: question (required), positions (required), spreadName (required), description (required), +2 more. Returns: cards, question, readingId, sessionId, +3 more

find_similar_cardsA
Read-onlyIdempotent

Find cards with similar meanings to a given card

Inputs: cardName (required), limit.

get_card_infoA
Read-onlyIdempotent

Get detailed information about a specific tarot card from the Rider-Waite deck

Inputs: cardName (required), language, orientation.

get_card_meanings_comparisonA
Read-onlyIdempotent

Compare 2-5 tarot cards, including optional card orientation, to understand their relationships and combined message

Inputs: cards, context, language, cardNames.

get_daily_cardA
Read-only

Draw a single card for daily guidance and insight

Inputs: language, question. Returns: cards, question, readingId, sessionId, +3 more

get_database_analyticsA
Read-onlyIdempotent

Get comprehensive analytics and statistics about the tarot card database

Inputs: includeRecommendations.

get_moon_phase_readingB
Read-only

Perform a tarot reading based on the current moon phase with an appropriate spread

Inputs: question (required), language, customDate.

get_random_cardsB
Read-only

Get random cards with optional filtering

Inputs: suit, count, arcana, element.

get_session_historyA
Read-onlyIdempotent

List the readings performed so far in a session (summaries with spread, question, time, and drawn cards)

Inputs: sessionId (required). Returns: createdAt, sessionId, readingCount, storedReadings

list_all_cardsA
Read-onlyIdempotent

List all available tarot cards in the Rider-Waite deck

Inputs: category.

list_available_spreadsA
Read-onlyIdempotent

List all available tarot spreads with their positions and meanings

Inputs: language.

perform_readingC

Perform a tarot card reading using a specific spread

Inputs: question (required), spreadType (required), language, sessionId. Returns: cards, question, readingId, sessionId, +3 more

recommend_spreadA
Read-onlyIdempotent

Get a recommendation for the most appropriate tarot spread based on your question or situation

Inputs: question (required), category, language, timeframe. Returns: category, question, timeframe, recommendations

search_cardsA
Read-onlyIdempotent

Search for tarot cards using various criteria like keywords, suit, element, etc.

Inputs: suit, limit, arcana, number, +3 more. Returns: results, showing, totalMatches

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose, from card info to reading types to analytics. While some tools involve drawing cards, their contexts (daily, moon phase, custom spread, general reading) are well-defined and described.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (e.g., get_card_info, perform_reading, list_available_spreads), making the naming predictable and easy to interpret.

    Tool Count5/5

    14 tools cover the domain thoroughly without being excessive. Each tool serves a specific need in tarot reading, from database exploration to personalized readings.

    Completeness4/5

    The tool set covers core tarot functionalities: card info, various reading types, spread management, search, and history. Minor gaps like advanced filtering or reading notes exist but do not hinder primary use cases.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      Enables users to perform tarot card readings and generate horoscopes based on specified dates, times, and locations. Provides mystical divination services through tarot draws and astrological calculations.
      2
      -
    • A
      license
      A
      quality
      D
      maintenance
      Provides tarot card reading capabilities with a complete 78-card deck, multiple spread layouts (Celtic Cross, Past-Present-Future, etc.), and detailed card interpretations for divination and daily guidance.
      9
      18 npm
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides tarot card meanings, spreads (three-card, yes/no), and random draws for any MCP-compatible client.
      5
      9 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides fortune-telling tools including tarot card spreads, Thai horoscope, zodiac info, and auspicious dates. Enables interactive tarot card picking via an MCP App UI and returns structured JSON for interpretation.
      1,950 npm
      MIT