Skip to main content
Glama
freshlife001

Texas Holdem MCP Server

by freshlife001
README.md
# Texas Holdem MCP Server

This is an [Model Context Protocol server](https://github.com/modelcontextprotocol/servers) that allows an MCP client agents to play a game of [Texas Holdem poker game](<https://simple.wikipedia.org/wiki/Texas_hold_%27em>). It is implemented with Node.js and TypeScript, including game server, game client, and a MCP Server.

Most Code in this project is generated by AI(Claude-3.7-Sonnet), and it tooks about 5 hours to improve and debug. Its Amazing!

## Online Demo

[Texas Holdem Online](<https://poker.ihuaj.com/>)


<a href="https://glama.ai/mcp/servers/@freshlife001/mcp_poker">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@freshlife001/mcp_poker/badge" alt="Texas Holdem Server MCP server" />
</a>

![Screen capture](static/screen_01.png)

![Screen capture](static/screen_02.png)

![Screen capture](static/screen_03.png)

## Getting started

* Build :

```bash
npm install
npm run build
```

* Run Poker Server:

```bash
npm run dev
```

* Open Poker Client:
Open your browser visit http://localhost:3000/

- Configure your MCP client to add the tool. For example, here is how to add the tool to Cline, assuming you cloned the repo at `/path/to/poker-mcp-server`:

```JSON
{
  "mcpServers": {
    "poker-mcp-server": {
      "command": "node",
      "args": ["/path/to/poker-mcp-server/dist/mcpServer.js"],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}
```

- Cline:

  ![Screenshot of install mcp server](static/add_tools.png)

## Example prompt

```
You are a Texas Hold'em poker expert. Please use the name "Super Awesome Pro" to join a Texas Hold'em poker game and win more chips. You can only use the functions provided by the poker-mcp-server MCP server. After joining the game, you must wait for your turn to act before proceeding to the next move.
```

Enjoy Playing Poker With LLM!

TDQS

C2.4/5.0

Scored across 9 tools

Disambiguation5/5

Every tool has a clearly distinct purpose with no ambiguity. The five action_* tools each represent a specific poker move (bet, call, check, fold, raise), while the other four tools handle table management and login functions. There is no overlap in functionality between these categories.

Naming Consistency4/5

The naming is mostly consistent with a clear verb_noun pattern, but there is one minor deviation. The action_* tools follow a consistent 'action_verb' format, and get_table_status, join_table, and leave_table follow a 'verb_noun' pattern. However, 'login' breaks this pattern by being a single verb without a noun, though it's still readable.

Tool Count5/5

With 9 tools, this server is well-scoped for a Texas Hold'em poker domain. It covers essential actions (bet, call, check, fold, raise), table management (join, leave, get status), and authentication (login), with each tool earning its place without being excessive or insufficient.

Completeness4/5

The tool surface is largely complete for basic poker gameplay, covering key actions and table lifecycle. However, there are minor gaps, such as no tools for creating or listing tables, which might be inferred from 'login' but aren't explicitly provided, potentially requiring workarounds for full table management.

Maintenance

ActivityInactive
ResponsivenessNo issues