A LangGraph-powered AI agent built to solve the daily New York Times Wordle puzzle using a structured workflow and MCP-enabled publishing.
- 🧠 Graph-Based Intelligence: Uses a LangGraph workflow to manage guessing, validation, and publishing.
- 🛠️ MCP Integration: Publishes results through external MCP tools (Slack, WhatsApp, NYT).
- 💬 Slack Publishing: Sends the Wordle result grid to a configured Slack channel.
- 📱 WhatsApp Integration: Automated WhatsApp messaging using
pywhatkit. - 📝 NYT Commenting: Generates and posts friendly comments for the NYT community.
- 🎨 Rich Terminal UI: Provides live feedback and polished terminal output.
- 🧱 Modular Codebase: Clear separation between game logic, prompts, solver nodes, and publishing.
src/app.py— main application entrypointsrc/core/game.py— Wordle game rules, feedback, and grid renderingsrc/core/graph_builder.py— LangGraph workflow construction and node transitionssrc/agents/prompts.py— LLM prompt templates and chain configurationsrc/agents/solver.py— solver node implementations for guessing and validationsrc/agents/publisher.py— MCP publisher nodesrc/mcp/social-media-mcp.py— MCP server hosting Slack, WhatsApp, and NYT toolssrc/mcp/whatsapp.py— WhatsApp messaging utility
The solver runs as a three-node state machine:
graph TD;
__start__([__start__])
GUESS(GUESS)
VALIDATE(VALIDATE)
PUBLISH(PUBLISH)
__end__([__end__])
__start__ --> GUESS;
GUESS --> VALIDATE;
VALIDATE -.-> GUESS;
VALIDATE -.-> PUBLISH;
PUBLISH --> __end__;
- uv
- A compatible LLM backend configured via
MODEL_NAME - A local or remote MCP endpoint
-
Clone the repository:
git clone https://github.com/Navin3d/NYT-Wordle-Solver.git cd NYT-Wordle-Solver -
Install dependencies:
uv sync
-
Configure environment variables by creating
src/.env:SLACK_BOT_TOKEN=xoxb-111111-22221222-jhghg SLACK_CHANNEL_ID=#general WHATSAPP_CONTACTS_TO_SEND=+919442807217 MODEL_NAME=gemma4:latest
Before running the solver, start the Social Media MCP server in a separate terminal:
uv run python src/mcp/social-media-mcp.pyThe current publisher module is configured to use an MCP service at
http://localhost:8010/mcp.
Run the solver from the project root:
uv run python src/app.py- LangGraph / LangChain
- Python 3.13
- Rich
- uv
- FastMCP