codenames-mcp-server

codenames-mcp-server

Enables playing the board game Codenames cooperatively with an AI spymaster (Claude) through MCP tools. Players guess words on a live board while Claude gives clues.

Category
访问服务器

README

codenames-mcp-server

Play Codenames with your Claude — not against a bot, and not against an API call. The Claude instance in your chat is the spymaster: it sees the hidden key through MCP tools and gives you one-word clues. You guess on a live board in your browser. Every clue is a genuine decision by the model you're mid-conversation with.

One small Node server does both jobs: it speaks MCP to Claude on /mcp and serves the human's board on /room/<CODE>.

The game

Cooperative, one-team Codenames:

  • 25 words. 9 are your agents, 2 are assassins, the rest are bystanders. Only the spymaster (Claude) sees which is which.
  • Claude gives a clue: one word + a number (e.g. OCEAN 3). You may guess up to number + 1 words.
  • Reveal an agent → keep guessing. A bystander → turn ends. An assassin → game over.
  • Find all 9 agents within 8 clues to win. Difficulty is configurable per game.

The server enforces the mechanical rules (clue can't match or contain a board word, phase order, guess limits). The spirit of the rules — clues about meaning only, no smuggled information — is on the players, as in the tabletop original.

Run it locally

npm install
npm run build
npm start            # listens on :3000

Test the MCP side with the inspector:

npx @modelcontextprotocol/inspector
# connect to http://localhost:3000/mcp (Streamable HTTP)

Deploy (so your Claude can reach it)

claude.ai connects to remote MCP servers over HTTPS, so deploy anywhere that runs Node and gives you a public URL. Fly.io example (a Dockerfile and fly.toml are included):

fly launch --no-deploy      # accept the generated app name or pick one
fly secrets set PUBLIC_URL=https://<your-app>.fly.dev
fly deploy

PUBLIC_URL is only used to build the join links Claude shows you — set it to wherever the server is reachable.

Connect Claude

  1. In claude.ai / the Claude app: Settings → Connectors → Add custom connector.
  2. URL: https://<your-app>.fly.dev/mcp (no authentication).
  3. In a chat, enable the connector and say: "Create a Codenames room and be my spymaster."

How a session flows

  1. Claude calls codenames_create_room, receives the secret key, and tells you the join URL (e.g. /room/AMBER-FOX). Open it on any device.
  2. Claude calls codenames_give_clue — the clue types itself onto your board.
  3. Tap words to guess (tap twice to confirm). Bystander or "stop guessing" ends your turn.
  4. Send Claude any message ("done", "your turn", or your table talk). Chat models only act when you message them, so this is the drumbeat of the game. Claude calls codenames_get_state, reads what happened, and gives the next clue.
  5. Win, lose, post-mortem, and codenames_restart for a rematch on the same URL.

MCP tools

Tool Purpose
codenames_create_room New room + board; returns the spymaster key and join URL. Options: agents, assassins, turn_limit.
codenames_get_state Full spymaster view: phase, board with identities, log.
codenames_give_clue Post a clue (clue, count; count: 0 = unlimited guesses). Validated against board words.
codenames_restart Fresh board, same room code/URL.

Notes and limits

  • State is in memory. Rooms expire after 24 h idle and vanish on redeploy. Perfect for pick-up games; add Redis/SQLite if you want persistence.
  • No auth. Room codes are the only secret (~400 combinations — fine among friends, not adversaries). Don't expose anything sensitive through this server.
  • The word pool is an original list of common English nouns; swap in your own in src/words.ts (any language works — the game is a great bilingual exercise).

MIT licensed. Built to be forked: Duet-style two-sided keys, competitive two-team mode, or entirely different turn-based games all fit the same referee-server pattern.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选