Logo vun Swift Tarot MCP Server

Swift Tarot MCP Server

Communautéit
junebash

A Swift-based MCP (Model Context Protocol) server for tarot card readings

Editeurjunebash
Repositoryswift-tarot-mcp
SproochSwift
Forks
2
Stären
6
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Swift Tarot MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    6 Stären an 2 Forks aus dem verlinkte Repository.

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)

bash
brew install just

Build and Install

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

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

Alternatively, you can build manually:

bash
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:

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:

bash
# 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:

bash
# 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:

bash
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:

json
[
  {
    "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.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

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

Swift Tarot MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Swift Tarot MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Swift Tarot MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Swift Tarot MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "junebash-swift-tarot-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "swift-tarot-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Swift Tarot MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Swift Tarot MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Swift Tarot MCP Server?
Swift Tarot MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat Swift Tarot MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Swift Tarot MCP Server benotzt?

Swift Tarot MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Swift Tarot MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Swift Tarot MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Swift Tarot MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Swift Tarot MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Swift Tarot MCP Server MCP mat TypingMind?

Swift Tarot MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Swift Tarot MCP Server MCP an TypingMind zur Verfügung?

Swift Tarot MCP Server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Swift Tarot MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Swift Tarot MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇