Mirror

Provides a reflection tool that lets models self-evaluate and refine their reasoning via MCP sampling.
  • typescript

10

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "toby-mirror-mcp": {
      "command": "npx",
      "args": [
        "mirror-mcp@latest"
      ]
    }
  }
}

mirror-mcp provides an MCP server with a self-reflection capability through the reflect tool. It enables LLMs to engage in metacognitive analysis by asking themselves questions and receiving structured reflections via MCP sampling, supporting more robust reasoning and iterative problem solving.

How to use

You use mirror-mcp by connecting an MCP client that can call tools via the MCP protocol. The primary tool is reflect, which lets the LLM pose a question to itself and receive a reflective answer. You can customize the reflection flow with system and user prompts to shape how the model analyzes its own reasoning, strengths, weaknesses, and assumptions. Use reflect to calibrate confidence, identify potential blind spots, and explore alternative perspectives in a guided, repeatable way.

How to install

Prerequisites: you need Node.js 18 or higher and a package manager such as npm or yarn.

# 1) Quick start with no installation (uses npx to run the latest package)
npx mirror-mcp

# 2) Install globally for convenient access
npm install -g mirror-mcp

# 3) Run after installation
mirror-mcp

# 4) If you prefer building from source
git clone https://github.com/toby/mirror-mcp.git
cd mirror-mcp
npm install
npm run build
npm start

Configuration and runtime notes

The MCP host configuration for a standard stdio-based client uses a command that runs the server locally. This is the recommended approach when you want tight integration with your tooling and you control the runtime environment.

{
  "type": "stdio",
  "name": "mirror_mcp",
  "command": "npx",
  "args": ["mirror-mcp@latest"]
}

Security and best practices

Keep your MCP endpoints secure and limit access to trusted clients. When using local or shared environments, consider restricting invocation to authenticated processes and review any prompts or prompts’ system/user prompts before enabling reflective analysis in production workloads.

Troubleshooting tips

If the server fails to start, verify you have Node.js 18+ installed and that npm or yarn is available. Check for the npm install and build steps completing successfully if you built from source, then ensure the start script runs without errors. If you encounter reflection-related issues, review the prompts used for reflect to ensure they are well-formed and that the MCP client is correctly wired to the reflect tool.

Notes

mirror-mcp emphasizes a lightweight footprint with straightforward setup, enabling a practical metacognitive workflow for AI models through the reflect tool.

Available tools

reflect

Enables the LLM to ask itself a question and receive a response through MCP sampling, with optional custom prompts to guide system and user directions.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational