Skip to main content
Glama
mcp-cursor-flowiseai

mcp-cursor-flowiseai

by Big-Brother
README.md
# 🚀 MCP-Cursor-FlowiseAI

<div align="center">

[![GitHub stars](https://img.shields.io/github/stars/Big-Brother/mcp-cursor-flowiseai?style=social)](https://github.com/Big-Brother/mcp-cursor-flowiseai)
[![GitHub forks](https://img.shields.io/github/forks/Big-Brother/mcp-cursor-flowiseai?style=social)](https://github.com/Big-Brother/mcp-cursor-flowiseai)
[![GitHub issues](https://img.shields.io/github/issues/Big-Brother/mcp-cursor-flowiseai)](https://github.com/Big-Brother/mcp-cursor-flowiseai/issues)
[![GitHub license](https://img.shields.io/github/license/Big-Brother/mcp-cursor-flowiseai)](https://github.com/Big-Brother/mcp-cursor-flowiseai/blob/main/LICENSE)
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
[![MCP](https://img.shields.io/badge/MCP-1.16.0-green.svg)](https://modelcontextprotocol.io/)
[![Flowise](https://img.shields.io/badge/Flowise-AI%20Agents-purple.svg)](https://flowiseai.com/)

**The Ultimate Flowise AI Integration for Cursor IDE**

*22 powerful tools for seamless AI-powered development workflows*

[📖 Documentation](#-documentation) • [🚀 Quick Start](#-quick-start) • [🛠️ Features](#️-features) • [📦 Installation](#-installation) • [💡 Examples](#-examples)

</div>

---

## 🎯 **What is MCP-Cursor-FlowiseAI?**

`MCP-Cursor-FlowiseAI` is a **comprehensive Python package** implementing a Model Context Protocol (MCP) server that integrates with the Flowise API, specifically designed for seamless Cursor IDE integration. It provides a standardized and flexible way to manage chatflows, create predictions, handle document stores, manage variables, and track chat messages - all from within your Cursor development environment.

### 🌟 **Why This Package?**

- **🎯 Built for Cursor**: Specifically designed for Cursor IDE workflows
- **🚀 22 Powerful Tools**: Complete Flowise management in one package
- **🤖 AI-Powered Development**: Integrate Flowise AI agents directly into your coding process
- **📚 RAG System Ready**: Build knowledge bases and query documents
- **⚡ Real-time**: Dynamic configuration and live AI assistance
- **🔧 Production Ready**: Comprehensive error handling and validation

### 📝 **Attribution**

This package is based on the original [mcp-flowise](https://github.com/matthewhand/mcp-flowise) by [@matthewhand](https://github.com/matthewhand), significantly enhanced with:
- **12 additional tools** (22 total vs original 10)
- **Document store management** for RAG systems
- **Variable management** for dynamic configuration
- **Chat message management** for conversation tracking
- **Cursor IDE optimization** and comprehensive documentation

---

## 🚀 **Quick Start**

### **1. Install via uvx (Recommended)**
```bash
uvx --from git+https://github.com/Big-Brother/mcp-cursor-flowiseai mcp-cursor-flowiseai
```

### **2. Configure Cursor IDE**
Add to your Cursor MCP configuration:
```json
{
  "mcpServers": {
    "mcp-cursor-flowiseai": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Big-Brother/mcp-cursor-flowiseai",
        "mcp-cursor-flowiseai"
      ],
      "env": {
        "FLOWISE_API_KEY": "YOUR_FLOWISE_API_KEY_HERE",
        "FLOWISE_API_ENDPOINT": "http://localhost:3000",
        "FLOWISE_SIMPLE_MODE": "true"
      }
    }
  }
}
```

### **3. Start Building AI Systems**
```python
# Create a knowledge base
create_document_store(name="My Knowledge Base", description="Project documentation")

# Set up dynamic configuration
create_variable(name="debug_mode", value="true", var_type="boolean")

# Query your knowledge base
query_document_store(store_id="your-store-id", query="How do I implement authentication?")
```

**🎉 That's it! You now have 22 powerful tools available in Cursor!**

---

## 📦 **Installation**

### **Prerequisites**
- Python 3.12 or higher
- Flowise instance running
- Cursor IDE

### **Install and Run via `uvx`**

Confirm you can run the server directly from the GitHub repository using `uvx`:

```bash
uvx --from git+https://github.com/Big-Brother/mcp-cursor-flowiseai mcp-cursor-flowiseai
```

### **Adding to Cursor IDE (`mcpServers` Configuration)**

You can integrate `MCP-Cursor-FlowiseAI` into your Cursor IDE by adding it to the `mcpServers` configuration. Example:

```json
{
    "mcpServers": {
        "mcp-cursor-flowiseai": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/Big-Brother/mcp-cursor-flowiseai",
                "mcp-cursor-flowiseai"
            ],
            "env": {
                "FLOWISE_API_KEY": "YOUR_FLOWISE_API_KEY_HERE",
                "FLOWISE_API_ENDPOINT": "http://localhost:3000",
                "FLOWISE_SIMPLE_MODE": "true"
            }
        }
    }
}
```

> **📋 Quick Setup**: See [CURSOR_SETUP.md](CURSOR_SETUP.md) for detailed Cursor IDE integration guide.

---

## 🛠️ **Features**

### **22 Powerful Tools:**

#### **Chatflow Management (6 tools):**
- `list_chatflows` - List all available chatflows
- `create_chatflow` - Create new chatflows
- `update_chatflow` - Update existing chatflows
- `delete_chatflow` - Delete chatflows
- `get_chatflow_details` - Get detailed chatflow info
- `create_prediction` - Send questions to chatflows

#### **Document Store Management (6 tools):**
- `list_document_stores` - List all document stores
- `create_document_store` - Create new document stores
- `get_document_store` - Get document store details
- `upsert_document` - Upload and process documents
- `query_document_store` - Search documents
- `delete_document_store` - Remove document stores

#### **Variable Management (4 tools):**
- `list_variables` - List all variables
- `create_variable` - Create new variables
- `update_variable` - Update variable values
- `delete_variable` - Remove variables

#### **Tool & Assistant Management (4 tools):**
- `list_tools` - List available tools
- `create_tool` - Create custom tools
- `list_assistants` - List available assistants
- `create_assistant` - Create new assistants

#### **Chat Message Management (2 tools):**
- `list_chat_messages` - Get conversation history
- `delete_chat_messages` - Clear conversation history

---

## 💡 **Usage Examples**

### **🎯 Cursor IDE Development Workflow**

```python
# Create a knowledge base for your project documentation
create_document_store(
    name="Project Knowledge Base",
    description="Code documentation, APIs, and best practices"
)

# Set up development environment variables
create_variable(name="debug_mode", value="true", var_type="boolean")
create_variable(name="api_version", value="v2", var_type="string")

# Query your knowledge base while coding
query_document_store(
    store_id="your-store-id",
    query="How do I implement authentication in this framework?"
)

# Create an AI assistant for code review
create_assistant(
    name="Code Review Assistant",
    description="AI assistant for code review and suggestions",
    instructions="Review code for best practices, security issues, and performance"
)
```

### **🎰 Building a Casino AI System**

```python
# Create a knowledge base for casino strategies
create_document_store(
    name="Casino Knowledge Base",
    description="Strategies and rules for casino games"
)

# Create variables for dynamic configuration
create_variable(name="game_type", value="blackjack", var_type="string")
create_variable(name="bankroll", value="1000", var_type="number")

# Query the knowledge base during gameplay
query_document_store(
    store_id="your-store-id",
    query="What is the optimal blackjack strategy for a 6-deck shoe?"
)
```

### **📚 Building a RAG System**

```python
# Create a document store for your knowledge base
create_document_store(
    name="Company Knowledge Base",
    description="Internal documentation and procedures"
)

# Upload documents to the store
upsert_document(
    store_id="your-store-id",
    files='[{"name": "manual.pdf", "content": "..."}]',
    loader_config='{"name": "pdfLoader", "config": {}}'
)

# Query for relevant information
query_document_store(
    store_id="your-store-id",
    query="How do I reset my password?"
)
```

---

## 🔧 **Environment Variables**

### **General**
- `FLOWISE_API_KEY`: Your Flowise API Bearer token (**required**).
- `FLOWISE_API_ENDPOINT`: Base URL for Flowise (default: `http://localhost:3000`).

### **FastMCP Mode (`FLOWISE_SIMPLE_MODE=true`)**
- `FLOWISE_CHATFLOW_ID`: Single Chatflow ID (optional).
- `FLOWISE_ASSISTANT_ID`: Single Assistant ID (optional).
- `FLOWISE_CHATFLOW_DESCRIPTION`: Optional description for the single tool exposed.

---

## 📚 **Documentation**

- **[CURSOR_SETUP.md](CURSOR_SETUP.md)** - Detailed Cursor IDE integration guide
- **[CHANGELOG.md](CHANGELOG.md)** - Version history and updates
- **[cursor-mcp-config-template.json](cursor-mcp-config-template.json)** - Ready-to-use configuration template

---

## 🤝 **Contributing**

We welcome contributions! This package is based on the original [mcp-flowise](https://github.com/matthewhand/mcp-flowise) and has been significantly enhanced.

### **Development Setup**
```bash
# Clone the repository
git clone https://github.com/Big-Brother/mcp-cursor-flowiseai.git
cd mcp-cursor-flowiseai

# Install in development mode
pip install -e .

# Run tests
python -m pytest tests/
```

---

## 📄 **License**

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

---

## 🆘 **Support**

For support and questions:
- **GitHub Issues**: [Create an issue](https://github.com/Big-Brother/mcp-cursor-flowiseai/issues)
- **Original Project**: [mcp-flowise](https://github.com/matthewhand/mcp-flowise) by [@matthewhand](https://github.com/matthewhand)

---

**Built with ❤️ for the Cursor IDE and Flowise AI communities**

*Enhanced from the original [mcp-flowise](https://github.com/matthewhand/mcp-flowise) with 12 additional tools and Cursor IDE optimization*