{"id":47905070,"url":"https://github.com/mteinum/tictactoe","last_synced_at":"2026-04-04T04:48:30.066Z","repository":{"id":344039904,"uuid":"1180197907","full_name":"mteinum/tictactoe","owner":"mteinum","description":"tictactoe in erlang with two claude ai agent players","archived":false,"fork":false,"pushed_at":"2026-03-12T23:15:58.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T04:48:26.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mteinum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-12T19:57:25.000Z","updated_at":"2026-03-12T23:16:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mteinum/tictactoe","commit_stats":null,"previous_names":["mteinum/tictactoe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mteinum/tictactoe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteinum%2Ftictactoe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteinum%2Ftictactoe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteinum%2Ftictactoe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteinum%2Ftictactoe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mteinum","download_url":"https://codeload.github.com/mteinum/tictactoe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteinum%2Ftictactoe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T04:48:29.536Z","updated_at":"2026-04-04T04:48:30.050Z","avatar_url":"https://github.com/mteinum.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teinum Tictactoe\n\n[![Build](https://github.com/mteinum/tictactoe/actions/workflows/build.yml/badge.svg)](https://github.com/mteinum/tictactoe/actions/workflows/build.yml)\n\nA Tic Tac Toe MCP (Model Context Protocol) server with two implementations (Erlang and Elixir) and Claude Code subagents that play against each other.\n\n[![Watch the video](https://img.youtube.com/vi/30yI5FJB3Rc/maxresdefault.jpg)](https://youtu.be/30yI5FJB3Rc)\n\n## Prerequisites\n\n- Erlang/OTP 27+\n- Elixir 1.19+ (for the Elixir implementation)\n- `rebar3` (for the Erlang implementation)\n- [Claude Code](https://claude.com/claude-code)\n\n## Build\n\n```bash\n# Erlang\ncd erlang \u0026\u0026 rebar3 escriptize\n\n# Elixir\ncd elixir \u0026\u0026 mix deps.get \u0026\u0026 mix escript.build\n```\n\n## Choosing the Server\n\nThe `run_server.sh` launcher script picks the implementation via the `TTT_SERVER` environment variable (`erlang` or `elixir`, defaults to `elixir`).\n\nSet it in `.mcp.json`:\n\n```json\n{\n  \"env\": { \"TTT_SERVER\": \"elixir\" }\n}\n```\n\n## MCP Server\n\nThe server communicates over stdio using JSON-RPC 2.0 and exposes four tools:\n\n| Tool | Description |\n|------|-------------|\n| `new_game` | Start a new game. Resets the board. X goes first. |\n| `make_move` | Make a move. Takes `player` (\"X\" or \"O\") and `position` (1-9). |\n| `get_board` | Get the current board as an ASCII grid. |\n| `get_status` | Get the game status: in progress, winner, or draw. |\n\nBoard positions are laid out as:\n\n```\n 1 | 2 | 3\n---+---+---\n 4 | 5 | 6\n---+---+---\n 7 | 8 | 9\n```\n\n### Add to an MCP client\n\n```json\n{\n  \"mcpServers\": {\n    \"tictactoe\": {\n      \"type\": \"stdio\",\n      \"command\": \"./run_server.sh\"\n    }\n  }\n}\n```\n\n## Player Agents\n\nTwo Claude Code subagents are included in `.claude/agents/` that can play against each other using the MCP server:\n\n- **player-x** -- Plays as X (always goes first).\n- **player-o** -- Plays as O.\n\nBoth agents share the same tictactoe MCP server instance (configured in `.mcp.json`) so they play on the same board.\n\n### Play a game\n\nStart a Claude Code session from the project directory and use the `/play-game` skill to run a full game automatically, or manually alternate between the player agents.\n\n## Project Structure\n\n```\nteinum-tictactoe/\n  run_server.sh                      # Launcher script (picks erlang or elixir)\n  .mcp.json                          # Shared MCP server config\n  .claude/\n    agents/\n      player-x.md                    # Player X subagent\n      player-o.md                    # Player O subagent\n    skills/\n      play-game/SKILL.md             # Skill to run a full game\n  erlang/\n    rebar.config                     # Build config (thoas JSON dependency)\n    src/\n      teinum_tictactoe.app.src       # OTP application descriptor\n      teinum_tictactoe.erl           # Escript entry point\n      teinum_tictactoe_app.erl       # Application behaviour\n      teinum_tictactoe_sup.erl       # Supervisor\n      ttt_game.erl                   # Game state gen_server\n      ttt_tools.erl                  # MCP tool definitions and execution\n      ttt_mcp.erl                    # JSON-RPC / MCP protocol dispatch\n      ttt_stdio.erl                  # Stdio read/write loop\n  elixir/\n    mix.exs                          # Build config (jason dependency)\n    lib/teinum_tictactoe_ex/\n      game.ex                        # Game state GenServer\n      tools.ex                       # MCP tool definitions and execution\n      mcp.ex                         # JSON-RPC / MCP protocol dispatch\n      stdio.ex                       # Stdio read/write loop\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmteinum%2Ftictactoe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmteinum%2Ftictactoe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmteinum%2Ftictactoe/lists"}