Blackjack MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Blackjack MCP Serverstart a new blackjack game with a $10 bet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Blackjack MCP Server
A Model Context Protocol (MCP) server that provides an interactive blackjack game experience using MCP-UI. This server exposes blackjack game functionality through MCP tools and provides a web-based UI for playing the game.
Features
š Full Blackjack Game: Complete blackjack implementation with standard rules
š§ MCP Tools: Blackjack game actions exposed as MCP tools
š® Interactive UI: React-based web interface using MCP-UI
š± Responsive Design: Mobile-friendly interface that scales appropriately
šØ Realistic Cards: Beautiful card designs with gradients and shadows
š° Game State Management: Persistent game state and money tracking
ā” Real-time Updates: Live game state synchronization
Related MCP server: Zypin MCP
Architecture
This MCP server is built using a full-stack React Router application with integrated MCP capabilities:
Key Components
MCP Tools (
src/tools/): Game actions exposed as MCP tools for external clientsUI Routes (
src/ui/routes/): React Router components for the web interfaceGame Engine (
src/lib/game.ts): Core blackjack game logic and state managementMCP Framework (
src/framework/): Custom MCP server implementation with Express integration
MCP Tools Available
blackjack-new-game: Start a new blackjack gameblackjack-hit: Hit (take another card)blackjack-stand: Stand (end turn)blackjack-double: Double downblackjack-split: Split pairsblackjack-surrender: Surrender handblackjack-take-insurance: Take insurance betblackjack-decline-insurance: Decline insurance
Getting Started
Prerequisites
Node.js 18+
npm or pnpm
Installation
Install the dependencies:
npm installDevelopment
Start the development server:
npm run devThe server will be available at:
Web UI:
http://localhost:5173/game/:idMCP endpoint:
http://localhost:5173/mcp
Building for Production
Create a production build:
npm run buildStart the production server:
npm run startDevelopment Commands
npm run dev- Start development server with HMRnpm run build- Create production buildnpm run start- Run production servernpm run typecheck- Run TypeScript type checkingnpm run lint- Run ESLint and Prettier checksnpm run format- Format code with Prettier
Usage
As a Web Application
Navigate to
http://localhost:5173Click "Deal Cards" to start a new game
Use the action buttons to play (Hit, Stand, Double, etc.)
Game state persists across sessions
As an MCP Server
The server exposes MCP tools that can be consumed by MCP clients:
// Example MCP tool call
{
"method": "tools/call",
"params": {
"name": "blackjack-new-game",
"arguments": {
"bet": 10
}
}
}Game Rules
Standard blackjack rules apply
Dealer stands on 17
Blackjack pays 3:2
Insurance pays 2:1
Double down allowed on any first two cards
Split allowed on pairs
Surrender allowed
Project Structure
src/
āāā framework/ # Custom MCP framework
ā āāā mcp-server.ts # MCP server implementation
ā āāā middleware.ts # Express middleware integration
āāā lib/ # Utility libraries
ā āāā game.ts # Core blackjack game logic
ā āāā db.ts # Game state persistence
ā āāā shell.ts # Shell execution utilities
āāā tools/ # MCP tools definitions
ā āāā index.ts # Tool exports
ā āāā blackjack.ts # Blackjack game tools
āāā ui/ # React Router frontend
āāā routes/ # Route components
ā āāā blackjack.tsx # Main game interface
āāā welcome/ # Welcome page assetsDeployment
Docker Deployment
Build and run using Docker:
docker build -t blackjack-mcp .
docker run -p 3000:3000 blackjack-mcpThe containerized application can be deployed to any platform supporting Docker:
AWS ECS
Google Cloud Run
Azure Container Apps
Fly.io
Railway
Environment Variables
PORT- Server port (default: 3000 in production, 5173 in development)NODE_ENV- Environment mode
Contributing
Fork the repository
Create a feature branch
Make your changes
Run tests and linting:
npm run lint && npm run typecheckSubmit a pull request
License
Apache 2.0 License - see LICENSE file for details.
Built with ā¤ļø using React Router, MCP, and the engine-blackjack library.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceA comprehensive MCP server that provides powerful web automation tools using Playwright, enabling web scraping, testing, and browser interaction through natural language commands.3815MIT
- -licenseBquality-maintenanceA lightweight MCP server for browser automation using Playwright with essential tools for navigation, form interaction, and web scraping. Provides 16 core browser automation tools with minimal setup and fast performance.16
- Alicense-qualityDmaintenanceProvides an interactive chess game experience through MCP tools with a web-based chessboard interface. Enables users to play chess games, make moves using standard algebraic notation, and manage persistent game state across sessions.875Apache 2.0
- Flicense-qualityDmaintenanceMCP server for headless browser automation using Puppeteer, enabling AI to navigate, click, fill forms, take screenshots, and execute JavaScript on web pages.
Related MCP Connectors
Deck of Cards MCP ā wraps deckofcardsapi.com (free, no auth)
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Build, deploy, and operate hosted web apps on VibeKit (vibekit.bot) from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nanobot-ai/blackjack'
If you have feedback or need assistance with the MCP directory API, please join our Discord server