Get the FREE Ultimate OpenClaw Setup Guide →

strawbery

An MCP server for counting the number of R's in Strawberry and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 3io-w-strawbery-mcp go run main.go \
  --env ENV="production" \
  --env PORT="3001"

How to use

Strawbery-MCP provides a single tool named strawberry-count that counts the occurrences of a specified single Unicode character within a given string. The search is case-insensitive and supports Unicode characters, including CJK. The response includes the total count and 1-indexed positions where the character appears. The server communicates over Server-Sent Events (SSE) for MCP-style interactions. To use it, send a JSON payload containing input (the string to search) and character (the target rune). Example: {"character": "r", "input": "strawberry"}. The server will return a JSON object like {"count": 3, "positions": [3, 8, 9]}. You can also observe the results via the provided SSE endpoint at /sse once the server is running. In OpenCode integration, the strawbery MCP can be referenced via the mcp block pointing to http://localhost:3001/sse.

How to install

Prerequisites:

  • Go (1.18+ recommended)
  • Optional: Docker if you prefer containerized usage

Install and run locally:

  1. Ensure Go is installed and your GOPATH/bin is in your PATH.

  2. Download or clone the repository containing the Strawbery-MCP server.

  3. In the project root, run:

    go run main.go

    This will start the MCP server (default port 3001).

Run with Docker (optional):

  1. Build the image:

    docker build -t strawbery-mcp .

  2. Run the container:

    docker run -p 3001:3001 strawbery-mcp

The server will be reachable at http://localhost:3001/sse for MCP communications.

Additional notes

Notes and tips:

  • The strawberry-count tool treats the target character as a single Unicode rune and performs a case-insensitive match.
  • The JSON response includes count (int) and positions (array of 1-indexed integers).
  • The server uses SSE for MCP communication; configure the client to listen to the /sse endpoint.
  • If running via Docker, ensure port 3001 is exposed and not blocked by firewalls.
  • In environments where multiple MCP servers are configured, you can adjust the PORT env var to align with your deployment port and your OpenCode or orchestrator settings.

Related MCP Servers

Sponsor this space

Reach thousands of developers