dreep-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dreep_mcp-0.1.0/.gitignore +27 -0
- dreep_mcp-0.1.0/CHANGELOG.md +20 -0
- dreep_mcp-0.1.0/LICENSE +21 -0
- dreep_mcp-0.1.0/PKG-INFO +389 -0
- dreep_mcp-0.1.0/README.md +357 -0
- dreep_mcp-0.1.0/npm/README.md +29 -0
- dreep_mcp-0.1.0/pyproject.toml +111 -0
- dreep_mcp-0.1.0/src/dreep_mcp/__init__.py +19 -0
- dreep_mcp-0.1.0/src/dreep_mcp/__main__.py +5 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_annotations.py +20 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_cli.py +85 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_constants.py +79 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_file_input.py +74 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_http_auth.py +57 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_params.py +49 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_serialize.py +40 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_server.py +60 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_settings.py +50 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tool_call.py +58 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tool_host.py +18 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tools_media.py +54 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tools_processing.py +114 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tools_project.py +105 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tools_uploads.py +112 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_tools_urls.py +51 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_transform_input.py +56 -0
- dreep_mcp-0.1.0/src/dreep_mcp/_version.py +3 -0
- dreep_mcp-0.1.0/src/dreep_mcp/py.typed +0 -0
- dreep_mcp-0.1.0/tests/__init__.py +0 -0
- dreep_mcp-0.1.0/tests/conftest.py +50 -0
- dreep_mcp-0.1.0/tests/support.py +99 -0
- dreep_mcp-0.1.0/tests/test_check_versions.py +28 -0
- dreep_mcp-0.1.0/tests/test_cli.py +81 -0
- dreep_mcp-0.1.0/tests/test_file_input.py +74 -0
- dreep_mcp-0.1.0/tests/test_git_guards.py +46 -0
- dreep_mcp-0.1.0/tests/test_http_auth.py +61 -0
- dreep_mcp-0.1.0/tests/test_rules.py +87 -0
- dreep_mcp-0.1.0/tests/test_serialize.py +31 -0
- dreep_mcp-0.1.0/tests/test_server.py +54 -0
- dreep_mcp-0.1.0/tests/test_settings.py +33 -0
- dreep_mcp-0.1.0/tests/test_stdio.py +30 -0
- dreep_mcp-0.1.0/tests/test_tools_media.py +44 -0
- dreep_mcp-0.1.0/tests/test_tools_processing.py +46 -0
- dreep_mcp-0.1.0/tests/test_tools_project.py +74 -0
- dreep_mcp-0.1.0/tests/test_tools_uploads.py +98 -0
- dreep_mcp-0.1.0/tests/test_tools_urls.py +54 -0
- dreep_mcp-0.1.0/tests/test_transform_input.py +34 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Environments
|
|
2
|
+
.venv/
|
|
3
|
+
.env
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*.egg-info/
|
|
9
|
+
build/
|
|
10
|
+
dist/
|
|
11
|
+
|
|
12
|
+
# Tooling
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.mypy_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
.coverage
|
|
17
|
+
coverage.xml
|
|
18
|
+
htmlcov/
|
|
19
|
+
|
|
20
|
+
# OS / editors
|
|
21
|
+
.DS_Store
|
|
22
|
+
.idea/
|
|
23
|
+
.vscode/
|
|
24
|
+
|
|
25
|
+
# Node
|
|
26
|
+
node_modules/
|
|
27
|
+
*.tgz
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0]
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- The Dreep MCP server, built on the `dreep` Python SDK 0.1.x and the MCP Python SDK 2.x.
|
|
14
|
+
- Tools: `upload_file`, `create_upload_url`, `confirm_upload`, `list_media`,
|
|
15
|
+
`remove_background`, `extract_text`, `convert_document`, `build_delivery_url`,
|
|
16
|
+
`build_signed_url`, `create_folder`, `list_folders`, `create_preset`, `list_presets`,
|
|
17
|
+
`get_usage`, and the opt-in `delete_media` and `delete_preset`.
|
|
18
|
+
- stdio and streamable HTTP transports, with bearer-token protection for HTTP.
|
|
19
|
+
- File-root sandboxing with `DREEP_MCP_FILE_ROOTS`.
|
|
20
|
+
- The `dreep-mcp` npm package, which runs the server through `uvx` or `pipx`.
|
dreep_mcp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dreep
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dreep_mcp-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: dreep-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The official Dreep MCP server: let any AI agent upload, transform, convert, OCR and deliver media through Dreep.
|
|
5
|
+
Project-URL: Homepage, https://dreep.cloud
|
|
6
|
+
Project-URL: Documentation, https://docs.dreep.cloud
|
|
7
|
+
Project-URL: Repository, https://github.com/IndigoSoftwares21/dreep-mcp
|
|
8
|
+
Project-URL: Issues, https://github.com/IndigoSoftwares21/dreep-mcp/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/IndigoSoftwares21/dreep-mcp/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Dreep
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: agents,ai,cdn,dreep,image,mcp,media,model-context-protocol,ocr
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Multimedia
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Requires-Dist: dreep<0.2,>=0.1.1
|
|
29
|
+
Requires-Dist: mcp<3,>=2.3
|
|
30
|
+
Requires-Dist: uvicorn>=0.30
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
<div align="center">
|
|
34
|
+
|
|
35
|
+
<a href="https://dreep.cloud">
|
|
36
|
+
<img src="https://raw.githubusercontent.com/IndigoSoftwares21/dreep-python/main/.github/assets/dreep-logo.svg" alt="Dreep" width="96" height="107">
|
|
37
|
+
</a>
|
|
38
|
+
|
|
39
|
+
<h1>Dreep MCP Server</h1>
|
|
40
|
+
|
|
41
|
+
<p><strong>Give any AI agent a media pipeline.</strong><br>
|
|
42
|
+
The official <a href="https://modelcontextprotocol.io">Model Context Protocol</a> server for
|
|
43
|
+
<a href="https://dreep.cloud">Dreep</a>: upload, transform, convert, OCR and deliver images,
|
|
44
|
+
videos and documents from Claude, Cursor, VS Code, Codex, Gemini and every other MCP client.</p>
|
|
45
|
+
|
|
46
|
+
[](https://pypi.org/project/dreep-mcp/)
|
|
47
|
+
[](https://www.npmjs.com/package/dreep-mcp)
|
|
48
|
+
[](https://github.com/abetoluwani/dreep-mcp/actions/workflows/ci.yml)
|
|
49
|
+
[](https://modelcontextprotocol.io)
|
|
50
|
+
[](LICENSE)
|
|
51
|
+
|
|
52
|
+
[Dreep docs](https://docs.dreep.cloud) ·
|
|
53
|
+
[API reference](https://docs.dreep.cloud/api-reference/upload/upload-media) ·
|
|
54
|
+
[Python SDK](https://github.com/IndigoSoftwares21/dreep-python) ·
|
|
55
|
+
[Changelog](CHANGELOG.md) ·
|
|
56
|
+
[Report a bug](https://github.com/abetoluwani/dreep-mcp/issues/new?template=bug_report.yml)
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
Ask your agent things like:
|
|
63
|
+
|
|
64
|
+
> *"Upload `~/Desktop/launch/hero.png` to `marketing/2026` and give me a 1200px WebP and a 400px square thumbnail."*
|
|
65
|
+
>
|
|
66
|
+
> *"Pull the text out of this scanned invoice."*
|
|
67
|
+
>
|
|
68
|
+
> *"Convert `contract.docx` to PDF and give me a link that expires in an hour."*
|
|
69
|
+
>
|
|
70
|
+
> *"Cut the background out of `product.jpg` and show it on white."*
|
|
71
|
+
|
|
72
|
+
## Contents
|
|
73
|
+
|
|
74
|
+
- [How it works](#how-it-works)
|
|
75
|
+
- [Quick start](#quick-start)
|
|
76
|
+
- [Add it to your client](#add-it-to-your-client): [Claude Desktop](#claude-desktop) · [Claude Code](#claude-code) · [Cursor](#cursor) · [VS Code](#vs-code-github-copilot) · [Windsurf](#windsurf) · [Codex CLI](#openai-codex-cli) · [Gemini CLI](#gemini-cli) · [Zed](#zed) · [Cline and others](#cline-and-other-clients) · [Remote (HTTP)](#remote-clients-over-http)
|
|
77
|
+
- [Tools](#tools)
|
|
78
|
+
- [Configuration](#configuration)
|
|
79
|
+
- [Security](#security)
|
|
80
|
+
- [Development](#development)
|
|
81
|
+
|
|
82
|
+
## How it works
|
|
83
|
+
|
|
84
|
+
```mermaid
|
|
85
|
+
flowchart LR
|
|
86
|
+
A["AI agent<br/>(Claude, Cursor, Codex...)"] -- "MCP<br/>stdio or HTTP" --> S["dreep-mcp"]
|
|
87
|
+
S -- "dreep Python SDK<br/>(your API key)" --> API["Dreep API"]
|
|
88
|
+
API --> CDN["Dreep CDN<br/>(or your custom domain)"]
|
|
89
|
+
S -. "URL building:<br/>no network" .-> CDN
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
1. Your MCP client starts `dreep-mcp` on your machine (stdio), or connects to one you host (streamable HTTP).
|
|
93
|
+
2. The agent sees 14 tools (16 with deletes enabled), each with a typed JSON schema that lists every valid transform value, so it calls them correctly the first time.
|
|
94
|
+
3. Each tool calls the official [`dreep` Python SDK](https://github.com/IndigoSoftwares21/dreep-python), which talks to the Dreep API with your key. Delivery and signed URLs are built locally, with no API call.
|
|
95
|
+
4. Results come back as structured JSON. Every asset carries the delivery `url` exactly as Dreep returned it, custom CDN domain included.
|
|
96
|
+
|
|
97
|
+
There is one implementation, in Python. The npm package `dreep-mcp` is a small launcher that runs the same PyPI package through `uvx` (or `pipx`), so `npx` users get the identical server.
|
|
98
|
+
|
|
99
|
+
## Quick start
|
|
100
|
+
|
|
101
|
+
1. Create an API key on the **API Keys** page of the [Dreep dashboard](https://dreep.cloud).
|
|
102
|
+
2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/), which runs the server with no separate install step:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
3. Add the server to your client (below). Any of these three commands starts the same server:
|
|
109
|
+
|
|
110
|
+
| Runner | Command | Needs |
|
|
111
|
+
| :- | :- | :- |
|
|
112
|
+
| **uvx** (recommended) | `uvx dreep-mcp` | [uv](https://docs.astral.sh/uv/) |
|
|
113
|
+
| **npx** | `npx -y dreep-mcp` | Node 18+ plus uv or pipx |
|
|
114
|
+
| **pip** | `pip install dreep-mcp`, then `dreep-mcp` | Python 3.10+ |
|
|
115
|
+
|
|
116
|
+
The examples below use `uvx`. To use npx instead, swap `"command": "uvx", "args": ["dreep-mcp"]` for `"command": "npx", "args": ["-y", "dreep-mcp"]`.
|
|
117
|
+
|
|
118
|
+
## Add it to your client
|
|
119
|
+
|
|
120
|
+
Every client needs the same three things: a command (`uvx`), its arguments (`dreep-mcp`), and your API key in the `DREEP_API_KEY` environment variable. Replace `drp_live_your_key` with your key. Add `DREEP_SIGNING_SECRET` if you use signed folders, and `DREEP_MCP_ALLOW_DELETE` if you want the delete tools (see [Configuration](#configuration)).
|
|
121
|
+
|
|
122
|
+
### Claude Desktop
|
|
123
|
+
|
|
124
|
+
Open **Settings → Developer → Edit Config**, which opens `claude_desktop_config.json`:
|
|
125
|
+
|
|
126
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
127
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"mcpServers": {
|
|
132
|
+
"dreep": {
|
|
133
|
+
"command": "uvx",
|
|
134
|
+
"args": ["dreep-mcp"],
|
|
135
|
+
"env": {
|
|
136
|
+
"DREEP_API_KEY": "drp_live_your_key",
|
|
137
|
+
"DREEP_SIGNING_SECRET": "your_signing_secret"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Restart Claude Desktop. **Dreep** appears under the tools (slider) icon in the message box.
|
|
145
|
+
|
|
146
|
+
> If Claude Desktop can't find `uvx`, use its full path (run `which uvx`, for example `/Users/you/.local/bin/uvx`). GUI apps don't always inherit your shell's `PATH`.
|
|
147
|
+
|
|
148
|
+
### Claude Code
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
claude mcp add dreep --scope user -e DREEP_API_KEY=drp_live_your_key -- uvx dreep-mcp
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`--scope user` makes it available in every project; leave it out to add it to the current project only, or use `--scope project` to share it with your team through `.mcp.json` (keep the key out of that file, as shown below). Check it with `claude mcp list`, or `/mcp` inside a session.
|
|
155
|
+
|
|
156
|
+
To share the setup in a repository without committing the key, put this in `.mcp.json` and let each person export `DREEP_API_KEY` in their own shell:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"mcpServers": {
|
|
161
|
+
"dreep": {
|
|
162
|
+
"command": "uvx",
|
|
163
|
+
"args": ["dreep-mcp"],
|
|
164
|
+
"env": { "DREEP_API_KEY": "${DREEP_API_KEY}" }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Cursor
|
|
171
|
+
|
|
172
|
+
Open **Cursor Settings → MCP → Add new MCP server**, or edit `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"mcpServers": {
|
|
177
|
+
"dreep": {
|
|
178
|
+
"command": "uvx",
|
|
179
|
+
"args": ["dreep-mcp"],
|
|
180
|
+
"env": { "DREEP_API_KEY": "drp_live_your_key" }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The Dreep tools are then available to the agent in chat.
|
|
187
|
+
|
|
188
|
+
### VS Code (GitHub Copilot)
|
|
189
|
+
|
|
190
|
+
Create `.vscode/mcp.json`. VS Code asks for the key the first time and stores it securely:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"inputs": [
|
|
195
|
+
{
|
|
196
|
+
"type": "promptString",
|
|
197
|
+
"id": "dreep-api-key",
|
|
198
|
+
"description": "Dreep API key",
|
|
199
|
+
"password": true
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"servers": {
|
|
203
|
+
"dreep": {
|
|
204
|
+
"type": "stdio",
|
|
205
|
+
"command": "uvx",
|
|
206
|
+
"args": ["dreep-mcp"],
|
|
207
|
+
"env": { "DREEP_API_KEY": "${input:dreep-api-key}" }
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Open Copilot Chat in **Agent** mode and pick the Dreep tools from the tools menu.
|
|
214
|
+
|
|
215
|
+
### Windsurf
|
|
216
|
+
|
|
217
|
+
Open **Windsurf Settings → Cascade → MCP Servers → View raw config**, or edit `~/.codeium/windsurf/mcp_config.json`:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"mcpServers": {
|
|
222
|
+
"dreep": {
|
|
223
|
+
"command": "uvx",
|
|
224
|
+
"args": ["dreep-mcp"],
|
|
225
|
+
"env": { "DREEP_API_KEY": "drp_live_your_key" }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### OpenAI Codex CLI
|
|
232
|
+
|
|
233
|
+
Add to `~/.codex/config.toml`:
|
|
234
|
+
|
|
235
|
+
```toml
|
|
236
|
+
[mcp_servers.dreep]
|
|
237
|
+
command = "uvx"
|
|
238
|
+
args = ["dreep-mcp"]
|
|
239
|
+
env = { DREEP_API_KEY = "drp_live_your_key" }
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Gemini CLI
|
|
243
|
+
|
|
244
|
+
Add to `~/.gemini/settings.json` (or `.gemini/settings.json` in a project):
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"mcpServers": {
|
|
249
|
+
"dreep": {
|
|
250
|
+
"command": "uvx",
|
|
251
|
+
"args": ["dreep-mcp"],
|
|
252
|
+
"env": { "DREEP_API_KEY": "drp_live_your_key" }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Zed
|
|
259
|
+
|
|
260
|
+
Add to Zed's `settings.json` (**Zed → Settings → Open Settings**):
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"context_servers": {
|
|
265
|
+
"dreep": {
|
|
266
|
+
"command": "uvx",
|
|
267
|
+
"args": ["dreep-mcp"],
|
|
268
|
+
"env": { "DREEP_API_KEY": "drp_live_your_key" }
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Cline and other clients
|
|
275
|
+
|
|
276
|
+
Cline (**MCP Servers → Configure**), Roo Code, Continue, Goose, JetBrains AI Assistant, LM Studio and most other clients take the same `mcpServers` block shown for [Cursor](#cursor). Anything that can launch a stdio MCP server can run `uvx dreep-mcp` with `DREEP_API_KEY` set.
|
|
277
|
+
|
|
278
|
+
### Remote clients over HTTP
|
|
279
|
+
|
|
280
|
+
For web-based agents, shared team servers or containers, run the streamable HTTP transport:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
export DREEP_API_KEY=drp_live_your_key
|
|
284
|
+
export DREEP_MCP_HTTP_TOKEN="$(openssl rand -hex 32)"
|
|
285
|
+
uvx dreep-mcp --transport http --host 0.0.0.0 --port 8000
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
The endpoint is `http://<host>:8000/mcp`, and every request must send `Authorization: Bearer <DREEP_MCP_HTTP_TOKEN>`. Put it behind HTTPS (a reverse proxy or your platform's load balancer) before exposing it. Then connect, for example from Claude Code:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
claude mcp add --transport http dreep https://mcp.example.com/mcp --header "Authorization: Bearer $DREEP_MCP_HTTP_TOKEN"
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Without `--host` it binds to `127.0.0.1`, and it refuses to bind to any other address unless `DREEP_MCP_HTTP_TOKEN` is set. Over HTTP the tools can't read files on the server unless you allow specific directories with `DREEP_MCP_FILE_ROOTS`; remote callers send files as `content_base64` instead.
|
|
295
|
+
|
|
296
|
+
## Tools
|
|
297
|
+
|
|
298
|
+
| Tool | What it does | Kind |
|
|
299
|
+
| :- | :- | :- |
|
|
300
|
+
| `upload_file` | Uploads an image, video, audio file or document from a local path or base64 content, optionally transforming it before storage. Files over 100 MB stream straight to storage. | writes |
|
|
301
|
+
| `create_upload_url` | Starts a presigned upload for bytes the server can't read (PUT them, then confirm). | writes |
|
|
302
|
+
| `confirm_upload` | Finalises a presigned upload and returns the asset. | writes |
|
|
303
|
+
| `list_media` | Lists assets with pagination, filtered by folder. | read-only |
|
|
304
|
+
| `remove_background` | Cuts the subject out of an image and stores a transparent PNG or WebP. | writes |
|
|
305
|
+
| `extract_text` | OCR for images and PDFs, optionally with line blocks and bounding boxes. | writes |
|
|
306
|
+
| `convert_document` | Word ↔ PDF, Excel, PowerPoint, CSV, or a PDF page to PNG/JPEG. | writes |
|
|
307
|
+
| `build_delivery_url` | Resize, crop, convert, compress, blur, round or trim an asset at the CDN. | local, no network |
|
|
308
|
+
| `build_signed_url` | A time-limited link for an asset in a signed folder. | local, no network |
|
|
309
|
+
| `create_folder` | Creates a folder or a whole path, with access control (`public`, `private`, `signed`) on top-level folders. | writes |
|
|
310
|
+
| `list_folders` | Lists folders with their paths and access control. | read-only |
|
|
311
|
+
| `create_preset` | Saves a named transform for reuse. | writes |
|
|
312
|
+
| `list_presets` | Lists saved presets. | read-only |
|
|
313
|
+
| `get_usage` | Storage used and image, file and folder counts. | read-only |
|
|
314
|
+
| `delete_media` | Permanently deletes an asset. **Only when `DREEP_MCP_ALLOW_DELETE` is set.** | destructive |
|
|
315
|
+
| `delete_preset` | Deletes a preset. **Only when `DREEP_MCP_ALLOW_DELETE` is set.** | destructive |
|
|
316
|
+
|
|
317
|
+
Every tool carries MCP [annotations](https://modelcontextprotocol.io/docs/concepts/tools#tool-annotations): read-only tools are marked so clients can run them without asking, and delete tools are marked destructive so clients ask you first.
|
|
318
|
+
|
|
319
|
+
A few behaviours come straight from the [API reference](https://docs.dreep.cloud), verified against the live API:
|
|
320
|
+
|
|
321
|
+
- **Use URLs as returned.** Projects can serve assets from a custom CDN domain, so the tools never construct a delivery URL from scratch; they transform the one Dreep returned.
|
|
322
|
+
- **Signed URLs sign the asset and expiry only** (`HMAC-SHA256` over `"{id}:{exp}"`). Transform parameters ride along unsigned.
|
|
323
|
+
- **Access control is set on top-level folders**; nested folders inherit it. The API has no endpoint for deleting folders.
|
|
324
|
+
- **Presets need a `format`**, and preset keys may only contain lowercase letters, digits and underscores.
|
|
325
|
+
|
|
326
|
+
## Configuration
|
|
327
|
+
|
|
328
|
+
| Variable | Required | Purpose |
|
|
329
|
+
| :- | :- | :- |
|
|
330
|
+
| `DREEP_API_KEY` | yes | Your project API key. |
|
|
331
|
+
| `DREEP_SIGNING_SECRET` | for signed URLs | The URL Signing Secret from the dashboard's API Keys page. |
|
|
332
|
+
| `DREEP_MCP_ALLOW_DELETE` | no | `1` registers `delete_media` and `delete_preset`. Off by default. |
|
|
333
|
+
| `DREEP_MCP_FILE_ROOTS` | no | Directories the file tools may read, separated by `:` (`;` on Windows). Unset over stdio means any file you can read; unset over HTTP means none. |
|
|
334
|
+
| `DREEP_MCP_HTTP_TOKEN` | for public HTTP | Bearer token every HTTP request must present. |
|
|
335
|
+
|
|
336
|
+
Command-line options:
|
|
337
|
+
|
|
338
|
+
```text
|
|
339
|
+
dreep-mcp [--transport {stdio,http}] [--host HOST] [--port PORT] [--path PATH]
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
| Option | Default |
|
|
343
|
+
| :- | :- |
|
|
344
|
+
| `--transport` | `stdio` |
|
|
345
|
+
| `--host` | `127.0.0.1` |
|
|
346
|
+
| `--port` | `8000` |
|
|
347
|
+
| `--path` | `/mcp` |
|
|
348
|
+
|
|
349
|
+
## Security
|
|
350
|
+
|
|
351
|
+
- **Your API key can read, upload and delete everything in the project.** It stays in the server's environment and is sent only to the Dreep API, never to the agent.
|
|
352
|
+
- **Deletes are off unless you turn them on**, and are marked destructive so clients confirm them.
|
|
353
|
+
- **File access is scoped.** Restrict which directories the agent can upload from with `DREEP_MCP_FILE_ROOTS`. Over HTTP, local file reads are off unless you set it.
|
|
354
|
+
- **The HTTP transport binds to localhost by default** and refuses a public address without `DREEP_MCP_HTTP_TOKEN`. Tokens are compared in constant time.
|
|
355
|
+
- **Signed URLs are bearer tokens.** Anyone with the link can fetch the asset until it expires.
|
|
356
|
+
|
|
357
|
+
Report vulnerabilities privately; see [SECURITY.md](SECURITY.md).
|
|
358
|
+
|
|
359
|
+
## Development
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
git clone https://github.com/abetoluwani/dreep-mcp.git
|
|
363
|
+
cd dreep-mcp
|
|
364
|
+
bash scripts/setup_hooks.sh # venv, dev dependencies, git hooks
|
|
365
|
+
bash scripts/quality_gate.sh # lint, format, repository rules, mypy --strict, tests, npm tests
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Try your local checkout in a client by pointing it at the venv: `"command": "/path/to/dreep-mcp/.venv/bin/dreep-mcp"`. To poke at the tools interactively, run the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
npx @modelcontextprotocol/inspector .venv/bin/dreep-mcp
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
The layout:
|
|
375
|
+
|
|
376
|
+
| Path | What lives there |
|
|
377
|
+
| :- | :- |
|
|
378
|
+
| `src/dreep_mcp/_tools_*.py` | One module per tool group: uploads, media, processing, URLs, project |
|
|
379
|
+
| `src/dreep_mcp/_server.py` | Builds the server and registers every tool group |
|
|
380
|
+
| `src/dreep_mcp/_cli.py` | The `dreep-mcp` command and both transports |
|
|
381
|
+
| `src/dreep_mcp/_params.py`, `_transform_input.py` | The schemas the agent reads |
|
|
382
|
+
| `npm/` | The `npx` launcher |
|
|
383
|
+
| `scripts/rules/` | Repository rules: file length, no magic strings, DRY, layering, security |
|
|
384
|
+
|
|
385
|
+
Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request, and [AGENTS.md](AGENTS.md) if you're an AI agent working in this repository.
|
|
386
|
+
|
|
387
|
+
## License
|
|
388
|
+
|
|
389
|
+
[MIT](LICENSE)
|