Swift Tarot MCP Server

Swift Tarot MCP Server

swift-tarot-mcp•byjunebash

A Model Context Protocol server written in Swift that provides tarot card reading functionality, letting AI assistants draw cards, view the full deck, and fetch card images.

License: MIT License•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Draws between 1 and 78 tarot cards in a single request with input validation and error handling.
  • •Returns all 78 cards in the traditional tarot deck.
  • •Fetches base64-encoded images for tarot card URIs.
  • •Uses seeded random number generation for deterministic, consistent testing.

BEST FOR

  • •Asking an AI assistant to draw a single tarot card or a multi-card reading.
  • •Browsing or displaying the complete tarot deck through an AI assistant.
  • •Retrieving the image of a specific tarot card such as The Fool.

ABOUT SWIFT-TAROT-MCP

Swift Tarot MCP Server is cataloged as an MCP server attributed to junebash. A Model Context Protocol server written in Swift that provides tarot card reading functionality, letting AI assistants draw cards, view the full deck, and fetch card images. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Swift Tarot MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What range of card counts can be drawn in a single request?

Between 1 and 78 cards can be drawn in one request, with a default of 1.

Why does this server provide its own random number generation?

Because LLMs are notoriously bad at randomness, similar to humans, so the server provides more reliable random number generation for tarot readings.

How are drawn cards returned?

Cards are returned as JSON objects containing a name and an imageURI, for example The Fool with tarot://card/major/0.

上游原版 README

在 GitHub 查看同一版本原文

README.md · fd32708561c9 · 采集于 2026-11-13 10:28:35 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Swift Tarot MCP Server

A Model Context Protocol (MCP) server that provides tarot card reading functionality. This server allows AI assistants to draw tarot cards, perform multi-card readings, and access the complete tarot deck.

Features

LLMs are notoriously bad at randomness, similar to humans. This MCP server provides more reliable random number generation for tarot readings.

  • Flexible Card Drawing: Draw anywhere from 1 to 78 tarot cards in a single request
  • Full Deck Access: View all 78 cards in the traditional tarot deck
  • Card Images: Fetch base64-encoded images for tarot cards
  • Deterministic Testing: Uses seeded random number generation for consistent testing
  • Comprehensive Validation: Input validation with proper error handling

Installation

Prerequisites

  • Swift 5.9 or later
  • macOS 13.0 or later
  • Just command runner (optional but recommended)

Install Just (Optional)

brew install just

Build and Install

  1. Clone the repository:
git clone <repository-url>
cd swift-tarot-MCP
  1. Build and install the server:
just install

This will build the release version and install it to /usr/local/bin/swift-tarot-MCP.

Alternatively, you can build manually:

swift build -c release
sudo cp .build/release/swift-tarot-MCP /usr/local/bin/

Claude Desktop Configuration

To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:

macOS Configuration

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "tarot": {
      "command": "swift-tarot-MCP",
      "args": []
    }
  }
}

After Configuration

  1. Restart Claude Desktop
  2. The tarot tools should now be available in your conversations
  3. You can ask Claude to draw tarot cards, perform readings, or show the full deck

Available Tools

draw_cards

Draws one or more tarot cards for readings.

Parameters:

  • count (optional): Number of cards to draw (1-78, default: 1)

Example usage in Claude:

"Draw me a tarot card" "Draw me 5 tarot cards for a reading"

get_full_deck

Returns all 78 cards in the tarot deck.

Example usage in Claude:

"Show me the complete tarot deck"

fetch_images

Fetches base64-encoded images for tarot card URIs.

Parameters:

  • uris: Array of tarot card URIs to fetch images for

Example usage in Claude:

"Show me the image for The Fool card"

Development

Available Commands

If you have Just installed, you can use these commands:

# Build the project (debug by default)
just build

# Build for release
just build release

# Run tests
just test

# Run tests with verbose output
just test --verbose

# Lint the code
just lint

# Auto-fix linting issues
just lint --fix

# Run the server locally
just run

# Clean build artifacts
just clean

# Install to system PATH
just install

# Remove from system PATH
just uninstall

Manual Commands

Without Just, you can use these Swift commands:

# Build debug
swift build

# Build release
swift build -c release

# Run tests
swift test

# Run linting
swift package plugin --allow-writing-to-package-directory swiftlint

Testing

The project includes comprehensive tests covering:

  • Tarot card data structures and validation
  • Deck composition and card drawing
  • Server handler functionality
  • MCP protocol compliance
  • Deterministic behavior with seeded RNG

Run tests with:

just test
# or
swift test

Architecture

The project is structured as:

  • TarotMCPCore: Core library containing tarot card logic and MCP server implementation
  • TarotMCP: Executable that runs the MCP server using stdio transport

Key Components

  • TarotCard: Enum representing major and minor arcana cards
  • TarotDeck: Static methods for card drawing and deck management
  • TarotServer: MCP server implementation
  • TarotServerHandler: Handles MCP tool calls and routing

Card Format

Cards are returned as JSON objects with card details:

[
  {
    "name": "The Fool",
    "imageURI": "tarot://card/major/0"
  },
  {
    "name": "Two of Cups",
    "imageURI": "tarot://card/minor/cups/2"
  },
  {
    "name": "King of Swords",
    "imageURI": "tarot://card/minor/swords/14"
  }
]

License

This project is licensed under the MIT License - see the LICENSE file for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Swift Tarot MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/swift-tarot-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent