Skip to main content
Glama
ParsaSarcheshmeh

Pollinations Think MCP Server

README.md
# ๐Ÿง  Pollinations Think MCP Server

An advanced Model Context Protocol (MCP) server that provides sophisticated thinking and analysis capabilities using the Pollinations AI API with DeepSeek reasoning models.

## ๐ŸŒŸ Features

- **๐ŸŽฏ Advanced Strategic Thinking**: Multi-cycle analysis with contradiction detection and synthesis
- **๐Ÿ”„ Flexible Model Support**: DeepSeek reasoning, OpenAI reasoning, and other advanced models
- **๐Ÿ›ก๏ธ Robust Error Handling**: Comprehensive retry logic and graceful degradation
- **โš™๏ธ Configurable Parameters**: Customizable thinking cycles, timeouts, and model selection
- **๐Ÿ“Š Health Monitoring**: Built-in health checks and status monitoring
- **โ˜๏ธ Cloud Deployment Ready**: Optimized for Smithery.ai deployment to resolve network issues

## ๐Ÿ› ๏ธ Available Tools

### 1. `think`
Advanced strategic thinking and analysis using openai-reasoning model.

**Parameters:**
- `text` (required): The topic, question, or problem to analyze
- `model` (optional): AI model to use (default: openai-reasoning)
- `seed` (optional): Random seed for reproducible results
- `maxCycles` (optional): Maximum thinking cycles (default: 3, max: 5)

**Example:**
```json
{
  "name": "think",
  "arguments": {
    "text": "Should a startup focus on growth or profitability first?",
    "maxCycles": 3
  }
}
```

### 2. `search`
Search the web in real-time using SearchGPT model.

**Parameters:**
- `query` (required): The search query to find information on the web

**Example:**
```json
{
  "name": "search",
  "arguments": {
    "query": "latest AI developments 2024"
  }
}
```

### 3. `continue_thinking`
Continue receiving the next part of a large thinking response.

**Parameters:** None

**Example:**
```json
{
  "name": "continue_thinking",
  "arguments": {}
}
```

## ๐Ÿš€ Installation

1. **Clone the repository:**
   ```bash
   git clone <repository-url>
   cd pollinations-think-mcp
   ```

2. **Install dependencies:**
   ```bash
   npm install
   ```

3. **Start the server:**
   ```bash
   npm start
   ```

## ๐Ÿงช Testing

### Run Basic Tests
```bash
npm test
```

### Test Search Functionality
```bash
node test-search.js
```

### Manual API Testing
Test the SearchGPT endpoint directly:
```bash
# PowerShell
(Invoke-WebRequest -Uri 'https://text.pollinations.ai/your query here/?model=searchgpt' -Method Get).Content
```

## ๐Ÿ“‹ API Endpoints Used

### Thinking (OpenAI Reasoning)
- **URL**: `https://text.pollinations.ai/{prompt}/?model=openai-reasoning&token=`
- **Method**: GET
- **Purpose**: Advanced reasoning and strategic analysis

### Search (SearchGPT)
- **URL**: `https://text.pollinations.ai/{prompt}/?model=searchgpt&token=`
- **Method**: GET
- **Purpose**: Real-time web search and current information retrieval

## ๐Ÿ”ง Configuration

### MCP Client Setup
Add to your MCP client configuration:

```json
{
  "mcpServers": {
    "pollinations-think": {
      "command": "node",
      "args": ["/path/to/pollinations-think-mcp/index.js"]
    }
  }
}
```

### Environment Variables
No environment variables required - the server uses public Pollinations.ai endpoints.

## ๐Ÿ“Š Response Handling

### Large Response Management
- Responses exceeding ~30KB are automatically split
- Use `continue_thinking` tool to get subsequent parts
- Continuation data is maintained across calls

### Error Handling
- Comprehensive error messages for debugging
- Graceful fallbacks for API failures
- Detailed logging for troubleshooting

## ๐ŸŽฏ Use Cases

### Strategic Thinking
- Business strategy development
- Problem-solving and decision making
- Risk assessment and mitigation planning
- Innovation and opportunity analysis

### Web Search
- Current events and news research
- Market research and competitive analysis
- Technical documentation lookup
- Real-time data verification

## ๐Ÿ” Example Outputs

### Think Tool Response
```
# ๐Ÿง  Advanced Strategic Thinking Analysis

## ๐Ÿ“‹ Analysis Overview
- Topic: Should a startup focus on growth or profitability first?
- Thinking Cycles: 3
- Analysis Depth: Advanced Multi-Layer Cognitive Processing

## ๐ŸŽฏ Strategic Analysis
[Comprehensive strategic framework with executive summary, 
risk mitigation, success metrics, and next steps]

## ๐Ÿ”ฌ Meta-Cognitive Assessment
[Quality assessment and thinking process evaluation]
```

### Search Tool Response
```
# ๐Ÿ” Web Search Results: latest AI developments 2024

## Recent AI Developments:
- [Trump plans executive orders to power AI growth](https://reuters.com/...)
- [Nvidia CES 2025 keynote highlights](https://apnews.com/...)
- [OpenAI's AGI roadmap for 2025](https://time.com/...)

[Detailed search results with sources and current information]
```

## ๐Ÿ›ก๏ธ Security

- Uses public API endpoints (no authentication required)
- No sensitive data storage
- Input validation and sanitization
- Safe error handling

## ๐Ÿ“ Version History

### v2.0.0
- โœ… Added real-time web search with SearchGPT
- โœ… Enhanced thinking engine with meta-cognitive assessment
- โœ… Improved response handling for large outputs
- โœ… Comprehensive testing suite

### v1.0.0
- Initial release with strategic thinking capabilities
- DeepSeek reasoning integration
- Basic MCP server implementation

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Submit a pull request

## ๐Ÿ“„ License

MIT License - see LICENSE file for details.

## ๐Ÿ™ Acknowledgments

- [Pollinations.ai](https://pollinations.ai) for providing the AI API endpoints
- [Model Context Protocol](https://modelcontextprotocol.io) for the MCP framework
- DeepSeek for the reasoning model
- SearchGPT for real-time web search capabilities

---

**Made with โค๏ธ for the MCP community**

TDQS

B3.3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: 'think' performs deep analysis, 'continue_thinking' refines previous analyses, and 'search' fetches real-time web information. The descriptions clearly differentiate these as separate cognitive and information-gathering functions.

Naming Consistency4/5

The naming is mostly consistent with verb-based patterns ('think', 'search', 'continue_thinking'), but 'continue_thinking' uses a compound verb while the others are single verbs. This minor deviation doesn't significantly hinder readability or predictability.

Tool Count3/5

With only 3 tools, the set feels thin for a 'Think MCP Server' that implies comprehensive cognitive support. While the tools cover core thinking and search functions, the scope suggests potential gaps in areas like summarization, comparison, or decision support that might be expected in such a domain.

Completeness3/5

The tools provide good coverage for analytical thinking and information retrieval, but there are notable gaps for a thinking server. Missing operations include tools for summarizing analyses, comparing different thinking sessions, or exporting insights, which could limit agent workflows for complex cognitive tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing