diff --git a/.gitignore b/.gitignore index b6bcb42..f4a9f04 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ examples/*/dist/ examples/nextjs/.next/ *.tsbuildinfo src/**/*.js -examples/*/src/**/*.js \ No newline at end of file +examples/*/src/**/*.js +docs/plans/ diff --git a/README.md b/README.md index 31e7a3e..81a7a7e 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ npm install webmcp-react zod ## Playground -Try it live: [**webmcp-react playground**](https://mcpcat.github.io/webmcp-react/playground/) +Try it live: [**WebMCP Wordle Demo**](https://mcpcat.github.io/webmcp-react/playground/) -The playground registers several example tools and includes a DevPanel for testing tool execution. Install the Chrome extension to bridge tools to AI clients like Claude and Cursor. +A fully playable Wordle clone that showcases `webmcp-react` hooks. Tools dynamically register and unregister as the game moves through phases (idle, playing, won/lost), and guesses can be made via keyboard or through a connected MCP agent. Includes a DevPanel for inspecting tool state and an easy-mode toggle that enables a hint tool. Install the Chrome extension to bridge tools to AI clients like Claude and Cursor. ## Quick start diff --git a/examples/playground/index.html b/examples/playground/index.html index 8ffdf56..399b748 100644 --- a/examples/playground/index.html +++ b/examples/playground/index.html @@ -3,7 +3,7 @@
-{state.lastResult.content[0].text}
- )} - {state.error &&{state.error.message}
} -
- Status: {available ? "available" : "loading..."}
-
+ A Wordle clone powered by{" "}
+ webmcp-react — every game action is an MCP tool.
+
+ Open the DevPanel on the right to see tools + register and unregister as game state changes. +
+
+ Normal: Guess any valid 5-letter word each turn.
+
+ Hard: Green letters must stay in the same position and yellow letters must be reused in every subsequent guess.
+
+ You guessed it in {gameState.guesses.length} attempt + {gameState.guesses.length !== 1 ? "s" : ""}! +
+ ) : ( ++ The word was {gameState.targetWord}. +
+ )} +
+ Normal: Guess any valid 5-letter word each turn.
+
+ Hard: Green letters must stay in the same position and yellow letters must be reused in every subsequent guess.
+