by toby
Mirror empowers introspection and self-questioning using advanced MCP sampling and configurable prompts for personal gro
Enables AI models to engage in self-reflection by asking themselves questions and receiving computed responses through recursive questioning. Uses configurable system prompts for specialized reflection perspectives like coaching or strategic analysis.
Mirror is a community-built MCP server published by toby that provides AI assistants with tools and capabilities via the Model Context Protocol. Mirror empowers introspection and self-questioning using advanced MCP sampling and configurable prompts for personal gro It is categorized under ai ml. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.
You can install Mirror in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
Mirror is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
Mirror has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
We wired Mirror into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
Mirror is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
I recommend Mirror for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Strong directory entry: Mirror surfaces stars and publisher context so we could sanity-check maintenance before adopting.
Mirror is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
Useful MCP listing: Mirror is the kind of server we cite when onboarding engineers to host + tool permissions.
Mirror reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
Mirror reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
Mirror has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
showing 1-10 of 27
A Model Context Protocol (MCP) server that provides a reflect tool, enabling LLMs to engage in self-reflection and introspection through recursive questioning and MCP sampling.
mirror-mcp allows AI models to "look at themselves" by providing a reflection mechanism. When an LLM uses the reflect tool, it can pose questions to itself and receive answers through the Model Context Protocol's sampling capabilities. This creates a powerful feedback loop for self-analysis, reasoning validation, and iterative problem-solving.
For other MCP-compatible clients, add the following configuration:
{
"type": "stdio",
"command": "npx",
"args": ["mirror-mcp@latest"]
}
npm install -g mirror-mcp
npx mirror-mcp
git clone https://github.com/toby/mirror-mcp.git
cd mirror-mcp
npm install
npm run build
npm start
reflectEnables the LLM to ask itself a question and receive a response through MCP sampling. The tool supports custom system and user prompts to help the LLM self-direct what kind of response it gets.
Self-Direction with Custom Prompts:
Parameters:
question (string, required): The question the LLM wants to ask itselfcontext (string, optional): Additional context for the reflectionsystem_prompt (string, optional): Custom system prompt to direct the reflection approachuser_prompt (string, optional): Custom user prompt to replace the default reflection instructionsmax_tokens (number, optional): Maximum tokens for the response (default: 500)temperature (number, optional): Sampling temperature (default: 0.8)Example:
{
"name": "reflect",
"arguments": {
"question": "How confident am I in my previous analysis of the data?",
"context": "Previous analysis showed a 23% increase in user engagement",
"max_tokens": 300,
"temperature": 0.6
}
}
Example with custom prompts:
{
"name": "reflect",
"arguments": {
"question": "What are the potential weaknesses in my reasoning?",
"system_prompt": "You are an expert critical thinking coach helping to identify logical fallacies and reasoning gaps.",
"user_prompt": "Analyze my reasoning step-by-step and provide specific examples of potential weaknesses or blind spots.",
"context": "Working on a complex machine learning model evaluation",
"max_tokens": 400,
"temperature": 0.7
}
}
Response:
{
"reflection": "Upon reflection, my confidence in the 23% engagement increase analysis is moderate to high. The data sources appear reliable, and the methodology follows standard practices. However, I should consider potential confounding variables such as seasonal effects or concurrent marketing campaigns that might influence the results.",
"metadata": {
"tokens_used": 67,
"reflection_time_ms": 1240
}
}
mirror-mcp is built on the principle that self-reflection is crucial for robust AI reasoning. By enabling models to question their own outputs and reasoning processes, we create opportunities for:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ LLM Client │───▶│ mirror-mcp │───▶│ MCP Sampling │
│ │ │ │ │ Infrastructure │
│ Calls reflect() │ │ Processes │ │ │
│ │◀───│ reflection │◀───│ Returns response│
└─────────────────┘ └─────────────────┘ └─────────────────┘
The Model Context Protocol provides a standardized way for AI models to connect with external resources and tools. By implementing mirror-mcp as an MCP server, we ensure:
The reflection mechanism leverages MCP's sampling capabilities to generate thoughtful responses. The sampling process:
This approach ensures that reflections are generated using the same model capabilities as the original reasoning, creating authentic self-assessment.
git clone https://github.com/toby/mirror-mcp.git
cd mirror-mcp
npm install
npm run dev
npm test
npm run build
We welcome contributions! Please see our Contributing Guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
"The unexamined life is not worth living" - Socrates
Enable your AI models to examine their own reasoning with mirror-mcp.
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.