A Model Context Protocol (MCP) server providing the 'think' tool for model reasoning and thought logging.
This server implements a single tool called think
that allows AI models to log their thoughts during complex reasoning processes. The tool is based on Anthropic's "think tool" specification and is designed to help models with:
- Complex reasoning tasks
- Multi-step problem solving
- Policy adherence in conversation
- Memory caching during long tool call chains
- ThinkTool: Logs model thoughts without changing state or obtaining new information
- Dual Logging: Thoughts are logged both to the console (for MCP clients) and to persistent disk files
- File Storage: Logs are stored in
%temp%\think-mcp-logs\think-mcp-<timestamp>.log
- MCP Compliant: Follows the Model Context Protocol specification
- Description: Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.
- Parameters:
thought
(string, required): A thought to think about.
- Response: Simple echo of the thought in format "Thought: [thought]"
- .NET 8.0 or later
- ModelContextProtocol NuGet package (preview)
cd ThinkMCP
dotnet run
The server will start and listen on stdin/stdout for MCP protocol messages.
To use this server with VS Code and Claude, you'll need to configure it in your MCP settings. The server expects to be launched via stdio transport.
Example configuration:
{
"mcpServers": {
"think": {
"command": "dotnet",
"args": ["run", "--project", "path/to/ThinkMCP/ThinkMCP.csproj"]
}
}
}
A test client is provided in the examples
folder:
cd examples
dotnet run
This will:
- Connect to the ThinkMCP server
- List available tools
- Test the think tool with sample thoughts
- Display responses
Thought logs are stored in:
- Windows:
%temp%\mcp\think\think-mcp-<timestamp>.log
- Format:
[timestamp LEVEL] message
Example log entry:
[2025-08-18 09:40:46 INF] Model thought: I need to analyze this complex problem step by step.
When a model uses the think tool:
Input:
{
"name": "think",
"arguments": {
"thought": "I need to consider the edge cases before proceeding with this solution."
}
}
Output:
{
"content": [
{
"type": "text",
"text": "Thought: I need to consider the edge cases before proceeding with this solution."
}
]
}
ThinkMCP/
├── ThinkMCP.csproj # Main project file
├── Program.cs # Server entry point and configuration
├── Tools/
│ └── ThinkTool.cs # ThinkTool implementation
├── examples/
│ ├── TestClient.csproj # Test client project
│ └── TestClient.cs # Test client implementation
└── README.md # This file
dotnet build
- ModelContextProtocol (preview)
- Microsoft.Extensions.Hosting
- Microsoft.Extensions.Logging
- Serilog for file logging
This project is provided as a sample implementation for educational purposes.