Metadata-Version: 2.4
Name: mcp-think
Version: 0.2.0
Summary: An MCP server implementing the think tool for Claude and other LLMs
Home-page: https://github.com/ddkang1/mcp-think
Author: Don Kang
Author-email: Don Kang <donkang34@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Don Kang
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/ddkang1/mcp-think
Project-URL: Bug Tracker, https://github.com/ddkang1/mcp-think/issues
Project-URL: Documentation, https://github.com/ddkang1/mcp-think#readme
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.2.0
Requires-Dist: uvicorn>=0.15.0
Requires-Dist: starlette>=0.17.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.18.0; extra == "dev"
Requires-Dist: black>=22.1.0; extra == "dev"
Requires-Dist: isort>=5.10.1; extra == "dev"
Requires-Dist: mypy>=0.931; extra == "dev"
Requires-Dist: flake8>=4.0.1; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# MCP Think

A Model Context Protocol (MCP) server implementing the "think" tool for improving Claude's and other LLMs' complex reasoning capabilities.

## Overview

This MCP server implements the "think" tool as described in Anthropic's [blog post](https://www.anthropic.com/engineering/claude-think-tool), which provides Claude with a dedicated space for structured thinking during complex problem-solving tasks. The think tool has been shown to significantly improve performance in complex tasks requiring policy adherence and reasoning in long chains of tool calls.

## Features

- **Structured Thinking Space**: Provides LLMs with a dedicated place to break down complex problems
- **Thought History**: Maintains a log of all thoughts with timestamps for reference
- **Multiple Transport Support**: Works with both stdio and SSE transports

## Installation

Install from PyPI:

```bash
pip install mcp-think
```

Or install from source:

```bash
git clone https://github.com/ddkang1/mcp-think.git
cd mcp-think
pip install -e .
```

## Usage

You can run the MCP server directly:

```bash
mcp-think
```

By default, it uses SSE transport. To use stdio transport:

```bash
mcp-think --transport stdio
```

You can also specify host and port for SSE transport:

```bash
mcp-think --host 0.0.0.0 --port 3001
```

## Configuration

To use this tool with Claude in Windsurf, add the following configuration to your MCP config file:

```json
"think": {
    "command": "/home/xxx/.local/bin/mcp-think",
    "args": ["--transport", "stdio"],
    "type": "stdio",
    "pollingInterval": 30000,
    "startupTimeout": 30000,
    "restartOnFailure": true
}
```

For SSE transport (default):

```json
"think": {
    "command": "/home/xxx/.local/bin/mcp-think",
    "args": [],
    "type": "sse",
    "pollingInterval": 30000,
    "startupTimeout": 30000,
    "restartOnFailure": true
}
```

The `command` field should point to the directory where you installed the python package using pip.

## Available Tools

The MCP server provides the following tool:

- **think**: Record a thought with a timestamp

## Development

### Installation for Development

```bash
git clone https://github.com/ddkang1/mcp-think.git
cd mcp-think
pip install -e ".[dev]"
```

### Running Tests

```bash
pytest
```

### Code Style

This project uses Black for formatting, isort for import sorting, and flake8 for linting:

```bash
black src tests
isort src tests
flake8 src tests
```

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
