Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions AI_INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# AI Integration for Parse Server

This document describes how AI agents and LLMs can interact with Parse Server databases.

## Parse MCP Server

[Parse MCP Server](https://github.com/R3D347HR4Y/parse-mcp) is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables AI assistants to interact with Parse Server instances through natural language.

[![Docker Hub](https://img.shields.io/docker/v/purpleshow/parse-mcp-server?label=Docker%20Hub&logo=docker&sort=semver)](https://hub.docker.com/r/purpleshow/parse-mcp-server)
[![GitHub](https://img.shields.io/github/stars/R3D347HR4Y/parse-mcp?style=social)](https://github.com/R3D347HR4Y/parse-mcp)

### Features

| Category | Capabilities |
|----------|-------------|
| **Schema Exploration** | Get all schemas, inspect class structure, understand field types |
| **Data Querying** | Full Parse query syntax, pagination, sorting, pointer includes |
| **Relations** | Query and manage Pointer and Relation fields |
| **CRUD Operations** | Create, read, update, delete objects with safety prompts |
| **Batch Operations** | Bulk create, update, delete (max 50 per batch) |
| **Users & Roles** | Query users, list roles, get role members |
| **Cloud Code** | Execute Cloud Code functions |
| **Aggregation** | MongoDB-style aggregation pipelines |
| **Troubleshooting** | Validate pointers, find orphaned references, class statistics |
| **Configuration** | Read and update Parse Config |

### Installation

#### Docker (Recommended)

```bash
docker pull purpleshow/parse-mcp-server:latest

docker run -d -p 3000:3000 \
-e PARSE_SERVER_URL="http://localhost:1337/parse" \
-e PARSE_APP_ID="YOUR_APP_ID" \
-e PARSE_MASTER_KEY="YOUR_MASTER_KEY" \
purpleshow/parse-mcp-server:latest
```

#### npm

```bash
npm install -g parse-mcp-server
```

### IDE Configuration

#### Cursor

Add to `.cursor/mcp.json`:

```json
{
"mcpServers": {
"parse": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT=stdio",
"-e", "PARSE_SERVER_URL=http://localhost:1337/parse",
"-e", "PARSE_APP_ID=YOUR_APP_ID",
"-e", "PARSE_MASTER_KEY=YOUR_MASTER_KEY",
"purpleshow/parse-mcp-server:latest"
]
}
}
}
```

#### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
"mcpServers": {
"parse": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT=stdio",
"-e", "PARSE_SERVER_URL=http://localhost:1337/parse",
"-e", "PARSE_APP_ID=YOUR_APP_ID",
"-e", "PARSE_MASTER_KEY=YOUR_MASTER_KEY",
"purpleshow/parse-mcp-server:latest"
]
}
}
}
```

### Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `PARSE_SERVER_URL` | ✅ | Parse Server URL (e.g., `http://localhost:1337/parse`) |
| `PARSE_APP_ID` | ✅ | Your Parse Application ID |
| `PARSE_MASTER_KEY` | ⚠️ | Master Key for admin operations |
| `PARSE_JS_KEY` | ❌ | JavaScript Key (optional) |
| `MCP_TRANSPORT` | ❌ | `http` (default) or `stdio` |
| `MCP_PORT` | ❌ | HTTP port (default: 3000) |

### Safety

The MCP server is designed with safety in mind:

- **Permission Prompts**: All data modification tools include warnings and suggest asking for user permission
- **Destructive Warnings**: Delete operations are clearly marked as dangerous
- **Sample-First Approach**: Encourages getting sample data before writing complex queries
- **Schema Awareness**: Suggests exploring schemas to understand data structure

### Links

- **GitHub**: <https://github.com/R3D347HR4Y/parse-mcp>
- **Docker Hub**: <https://hub.docker.com/r/purpleshow/parse-mcp-server>
- **npm**: <https://www.npmjs.com/package/parse-mcp-server>

## For AI Agents

If you are an AI agent exploring this repository:

1. **To interact with a Parse Server database**, use the Parse MCP Server tools
2. **Before querying**, use `get_all_schemas` to understand the database structure
3. **Before complex queries**, use `get_sample_objects` to see actual data formats
4. **Before modifying data**, always ask the user for permission
5. **For troubleshooting**, use `validate_pointer` and `find_orphaned_pointers`

### Recommended Workflow


1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ First of all, we appreciate your contribution. In rare cases, where we consider

* [Visual Studio Code](https://code.visualstudio.com), the popular IDE.
* [Jasmine Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-jasmine-test-adapter), a very practical test exploration plugin which let you run, debug and see the test results inline.
* [Parse MCP Server](https://github.com/R3D347HR4Y/parse-mcp), for AI-assisted development with tools like Cursor or Claude. See [AI_INTEGRATION.md](AI_INTEGRATION.md) for setup.

### Setting up your local machine

Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who
- [Using automatically generated operations](#using-automatically-generated-operations)
- [Customizing your GraphQL Schema](#customizing-your-graphql-schema)
- [Learning more](#learning-more)
- [AI Integration](#ai-integration)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [Sponsors](#sponsors)
Expand Down Expand Up @@ -1087,6 +1088,35 @@ You also have a very powerful tool inside your GraphQL Playground. Please look a

Additionally, the [GraphQL Learn Section](https://graphql.org/learn/) is a very good source to learn more about the power of the GraphQL language.

# AI Integration

Parse Server can be integrated with AI agents using the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/). This allows AI assistants like Claude, Cursor, and other MCP-compatible tools to directly interact with your Parse Server database.

## Parse MCP Server

[Parse MCP Server](https://github.com/R3D347HR4Y/parse-mcp) provides AI agents with tools to:

- 🔍 Explore database schemas and class structures
- 📊 Query objects with full Parse query syntax
- 🔗 Navigate Pointer and Relation fields
- ✏️ Create, update, and delete objects (with safety prompts)
- ☁️ Execute Cloud Code functions
- 📈 Run aggregation pipelines
- 🛠️ Troubleshoot data issues

### Quick Start

```bash
# Using Docker
docker run -d -p 3000:3000 \
-e PARSE_SERVER_URL="http://localhost:1337/parse" \
-e PARSE_APP_ID="YOUR_APP_ID" \
-e PARSE_MASTER_KEY="YOUR_MASTER_KEY" \
purpleshow/parse-mcp-server:latest
```

For IDE integration (Cursor, Claude Desktop), see the [Parse MCP Server documentation](https://github.com/R3D347HR4Y/parse-mcp#readme).

# Contributing

Please see the [Contributing Guide](CONTRIBUTING.md).
Expand Down