Text Mirror
FreeNot checkedMinimal MCP server in Go that reverses UTF-8 text (grapheme-safe) via stdio.
About
Minimal MCP server in Go that reverses UTF-8 text (grapheme-safe) via stdio.
README
A tiny MCP (Model Context Protocol) service written in Go. It mirrors (reverses) UTF-8 text while preserving grapheme clusters.
This repository implements a minimal MCP server and a single mirror tool to help me/us learn MCP basics and to build something that at minimum works with VS Code's Copilot (via stdio transport).
[!TIP]
Article about this project in Japanese: 「【Golang】最もシンプルな MCP Server を Go で堅牢に実装してみる」@ Qiita
Features
- MCP tool that reverses UTF‑8 text
- Unicode grapheme cluster–safe (handles emoji, combining marks, ZWJ sequences)
- stdio transport only (HTTP/SSE transports not implemented)
Prerequisites
- Requires Go 1.25 or newer (see go.mod).
- Go 1.25 is already released as of 2025-08.
golangci-lint(optional;make testruns lint)make(optional; for build and test automation)- MCP client that supports
stdiotransport
Quick Start
This app aims to work with VS Code's Copilot extension via MCP. Any MCP-compatible client that supports stdio transport, Claude Desktop for example, should also work.
Build & Test
Build:
make build # or go build -o text-mirror .Tests & lint:
make test # or golangci-lint run --fix go test -cover -race ./...
Using with VS Code (Copilot)
MCP support in VS Code is generally available as of version 1.102 and later.
Build the
text-mirroras executable binary (as above) and copy its absolute path.- e.g.,
/home/user/go/bin/text-mirror
- e.g.,
Register as an MCP server in VS Code's MCP config file.
Open VS Code's command palette (
F1orCtrl+Shift+P) and search for:MCP: Open User Configuration
Edit the generated
mcp.jsonas follows (bare minimal example):{ "servers": { "text-mirror": { "command": "/full/path/to/text-mirror", "env": { "MCP_TEXT_MIRROR_DEBUG_LOG": "/full/path/to/text-mirror.log" } } } }- If
mcp.jsonalready has other servers, just add thetext-mirrorentry underservers. commandis required.- Replace
/full/path/to/text-mirrorwith the actual path to the built binary.
- Replace
- If
typeis omitted, VS Code assumes"stdio"by default for local servers. So no need to specify it here. envis optional.- If
MCP_TEXT_MIRROR_DEBUG_LOGis present, it enables debug logging to the specified log file. - Replace
/full/path/to/text-mirror.logwith the desired log file path.
- If
- For more details about the configuration format, see the VS Code MCP documentation.
- If
Restart VS Code
- The
text-mirrorMCP server should appear in the VS Code extension list (as an Installed MCP server pane). - Click the configuration icon next to
text-mirrorand check what can be done.- You may but don't have to start the server manually here; VS Code will start it automatically when needed.
- For more details, see the VS Code MCP documentation.
- The
Call the
mirrortool via Copilot Chat.In Copilot Chat, select an "Agent" model that is MCP-capable.
- If a model supports MCP tools, the “tools” icon appears.
The
mirrortool should now be available. You can ask Copilot to use it:Reverse this text using text-mirror: 🙂🙃🙂👩💻👨💻123
or
Use the mirror tool to reverse "こんにちは"
How It Works
If the MCP server is locally running, MCP clients like VS Code MCP/Claude Desktop communicate with it in a very Unix-like way.
- The MCP clients start the
text-mirrorbinary as a subprocess (spawns the MCP server). - The MCP server listens for tool calls over stdio.
- MCP clients send instruction data (JSON-RPC) to the server’s stdin.
- The server processes the request, reverses the text, and sends the result back via stdout.
- The MCP client receives the response and displays it to the user.
Development notes
- Tests with edge cases and 100% test coverage
- Linting via
golangci-lint - Tests include table-driven cases for combining marks, ZWJ sequences, flags, and long strings to exercise tricky Unicode behavior.
.editorconfigis included to keep consistent formatting (tabs for Go files, spaces for other files, LF endings, UTF‑8 charset).
Contributing
This project is primarily a learning resource, but contributions are welcome (fixes, tests, documentation).
License
- MIT License. See LICENSE for details.
Installing Text Mirror
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/KEINOS/mcp-text-mirrorFAQ
Is Text Mirror MCP free?
Yes, Text Mirror MCP is free — one-click install via Unyly at no cost.
Does Text Mirror need an API key?
No, Text Mirror runs without API keys or environment variables.
Is Text Mirror hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Text Mirror in Claude Desktop, Claude Code or Cursor?
Open Text Mirror on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Gmail
Read, send and search emails from Claude
by GoogleSlack
Send, search and summarize Slack messages
by SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Klavis AI
Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord.
Work90210/APIFold
Turn any REST API into a hosted MCP server. 18 free public servers (GitHub, Stripe, Slack, OpenAI, Notion, and more) — no setup required, bring your own API key
by Work90210arikusi/deepseek-mcp-server
MCP server for DeepSeek AI with chat, reasoning, multi-turn sessions, function calling, thinking mode, and cost tracking.
by arikusihashgraph-online/hashnet-mcp-js
MCP server for the Registry Broker. Discover, register, and chat with AI agents on the Hashgraph network.
by hashgraph-onlineprofullstack/mcp-server
A comprehensive MCP server aggregating 20+ tools including SEO optimization, document conversion, domain lookup, email validation, QR generation, weather data,
by profullstackWayStation-ai/mcp
Seamlessly and securely connect Claude Desktop and other MCP hosts to your favorite apps (Notion, Slack, Monday, Airtable, etc.). Takes less than 90 secs.
by waystation-aiCompare Text Mirror with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All communication MCPs
