prometheux-mcp 0.1.3__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.
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024-2026, Prometheux Limited
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include version.txt
4
+ recursive-include tests *.py
@@ -0,0 +1,390 @@
1
+ Metadata-Version: 2.4
2
+ Name: prometheux-mcp
3
+ Version: 0.1.3
4
+ Summary: Model Context Protocol (MCP) server for Prometheux - enabling AI agents to interact with knowledge graphs and reasoning
5
+ Home-page: https://github.com/prometheuxresearch/px-mcp-server
6
+ Author: Prometheux Limited
7
+ Author-email: davben@prometheux.co.uk
8
+ License: BSD-3-Clause
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: mcp>=1.0.0
23
+ Requires-Dist: httpx>=0.25.0
24
+ Requires-Dist: pydantic>=2.0.0
25
+ Requires-Dist: pydantic-settings>=2.0.0
26
+ Requires-Dist: click>=8.0.0
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: home-page
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
38
+
39
+ # Prometheux MCP Server
40
+
41
+ [![PyPI version](https://badge.fury.io/py/prometheux-mcp.svg)](https://badge.fury.io/py/prometheux-mcp)
42
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
43
+ [![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
44
+
45
+ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) client that enables AI agents like Claude to interact with [Prometheux](https://prometheux.ai) knowledge graphs and reasoning capabilities.
46
+
47
+ ---
48
+
49
+ ## For Users
50
+
51
+ ### What This Does
52
+
53
+ This package lets you use **Claude Desktop** to interact with your Prometheux projects:
54
+ - List concepts in your projects
55
+ - Run concepts to derive new knowledge
56
+ - All through natural conversation with Claude
57
+
58
+ ### Prerequisites
59
+
60
+ - **Prometheux account** with access to a deployed instance
61
+ - **Claude Desktop** installed on your machine
62
+ - **Your credentials** (token, username, organization) from your Prometheux admin
63
+
64
+ ### Installation
65
+
66
+ **Using pipx (Recommended)**
67
+
68
+ pipx installs the package in an isolated environment and works reliably with Claude Desktop on all platforms.
69
+
70
+ **macOS:**
71
+ ```bash
72
+ brew install pipx
73
+ pipx ensurepath
74
+ pipx install prometheux-mcp
75
+ ```
76
+
77
+ **Windows/Linux:**
78
+ ```bash
79
+ pip install pipx
80
+ pipx install prometheux-mcp
81
+ ```
82
+
83
+ **Alternative: Using pip (Windows/Linux only)**
84
+
85
+ ```bash
86
+ pip install prometheux-mcp
87
+ ```
88
+
89
+ > **macOS users:** pip may have permission issues with Claude Desktop. Use pipx instead.
90
+
91
+ ### Configuration
92
+
93
+ 1. **Get your credentials** from your Prometheux admin or account settings:
94
+ - Server URL (e.g., `https://api.prometheux.ai`)
95
+ - Authentication token
96
+ - Username
97
+ - Organization
98
+
99
+ 2. **Configure Claude Desktop** by editing the config file:
100
+
101
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
102
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
103
+
104
+ **Configuration Example:**
105
+ ```json
106
+ {
107
+ "mcpServers": {
108
+ "prometheux": {
109
+ "command": "prometheux-mcp",
110
+ "args": ["--url", "https://api.prometheux.ai"],
111
+ "env": {
112
+ "PROMETHEUX_TOKEN": "your_token",
113
+ "PROMETHEUX_USERNAME": "your_username",
114
+ "PROMETHEUX_ORGANIZATION": "your_organization"
115
+ }
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ > **macOS Users:** If you get "Server disconnected" errors, use the full path instead of `"prometheux-mcp"`. Find it with `which prometheux-mcp` (usually `/Users/YOUR_USERNAME/.local/bin/prometheux-mcp` or similar).
122
+
123
+ > **Windows Users:** If you get "command not found", use the full path like `"C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\prometheux-mcp.exe"`. Find it with `where prometheux-mcp` in PowerShell.
124
+
125
+ > **Note:** The full path is automatically constructed from your username and organization. No need to include it in the URL!
126
+
127
+ > **Custom URLs:** For on-premise deployments or custom URLs, replace `https://api.prometheux.ai` with your own server URL.
128
+
129
+ 3. **Restart Claude Desktop** (quit completely with Cmd+Q, then reopen)
130
+
131
+ ### Usage
132
+
133
+ Once configured, just chat with Claude:
134
+
135
+ > "What concepts are available in project customer-analytics?"
136
+
137
+ > "Run the churn_prediction concept in project customer-analytics"
138
+
139
+ > "Show me the high_value_customers from project sales-data with min_value of 1000"
140
+
141
+ ### Available Tools
142
+
143
+ | Tool | Description |
144
+ |------|-------------|
145
+ | `list_concepts` | Lists all concepts in a project |
146
+ | `run_concept` | Executes a concept to derive new knowledge |
147
+
148
+ ### Troubleshooting
149
+
150
+ **"command not found" or "Server disconnected" errors:**
151
+
152
+ *macOS:*
153
+ 1. Find the full path: `which prometheux-mcp`
154
+ 2. Use that full path in your config (usually `/Users/YOUR_USERNAME/.local/bin/prometheux-mcp`)
155
+ 3. If still having issues, try pipx: `pipx install prometheux-mcp`
156
+ 4. Restart Claude Desktop completely (Cmd+Q, then reopen)
157
+
158
+ *Windows:*
159
+ 1. Find the full path: `where prometheux-mcp` (in PowerShell or Command Prompt)
160
+ 2. Use that full path in your config with double backslashes (e.g., `C:\\Python310\\Scripts\\prometheux-mcp.exe`)
161
+ 3. Restart Claude Desktop
162
+
163
+ **"Connection refused" error:**
164
+ Check that your Prometheux server URL is correct and accessible. Test with: `curl [YOUR_URL]/mcp/info`
165
+
166
+ **"Authentication failed" error:**
167
+ Verify your token, username, and organization are correct in the config.
168
+
169
+ **Check logs:**
170
+ - **macOS:** `~/Library/Logs/Claude/mcp-server-prometheux.log`
171
+ - **Windows:** `%APPDATA%\Claude\logs\mcp-server-prometheux.log`
172
+
173
+ ---
174
+
175
+ ## For Developers
176
+
177
+ This section is for developers who want to:
178
+ - Contribute to this package
179
+ - Test locally with a development JarvisPy instance
180
+ - Understand the architecture
181
+
182
+ ### Architecture
183
+
184
+ ```
185
+ ┌─────────────────────────────────────────────────────────────────────────┐
186
+ │ YOUR MACHINE │
187
+ │ ┌─────────────────┐ ┌─────────────────┐ │
188
+ │ │ Claude Desktop │ │ prometheux-mcp │ │
189
+ │ │ │──stdio──│ (this package) │ │
190
+ │ │ (AI Agent) │ │ │ │
191
+ │ └─────────────────┘ └────────┬────────┘ │
192
+ └───────────────────────────────────────┼─────────────────────────────────┘
193
+ │ HTTP
194
+
195
+ ┌─────────────────────────┐
196
+ │ Prometheux Server │
197
+ │ (JarvisPy) │
198
+ │ │
199
+ │ Cloud or On-Premise │
200
+ └─────────────────────────┘
201
+ ```
202
+
203
+ **Key points:**
204
+ - This is NOT a service you run — Claude Desktop starts it automatically
205
+ - Communication with Claude Desktop is via stdio (stdin/stdout)
206
+ - Communication with Prometheux is via HTTP
207
+ - Stateless — each Claude session starts a fresh instance
208
+
209
+ ### Local Development Setup
210
+
211
+ ```bash
212
+ # Clone the repository
213
+ git clone https://github.com/prometheuxresearch/px-mcp-server.git
214
+ cd px-mcp-server
215
+
216
+ # Create virtual environment
217
+ python -m venv venv
218
+ source venv/bin/activate
219
+
220
+ # Install in development mode
221
+ pip install -e ".[dev]"
222
+ ```
223
+
224
+ ### Testing with Local JarvisPy
225
+
226
+ 1. **Start JarvisPy** in development mode:
227
+ ```bash
228
+ cd /path/to/jarvispy
229
+ source venv/bin/activate
230
+ RUN_MODE=development python run.py
231
+ ```
232
+
233
+ 2. **Install your local package with pipx** (required for Claude Desktop on macOS):
234
+ ```bash
235
+ pipx install /path/to/px-mcp-server --force
236
+ ```
237
+
238
+ 3. **Configure Claude Desktop** to use localhost:
239
+ ```json
240
+ {
241
+ "mcpServers": {
242
+ "prometheux": {
243
+ "command": "/Users/YOUR_USERNAME/.local/bin/prometheux-mcp",
244
+ "args": ["--url", "http://localhost:8000", "--debug"]
245
+ }
246
+ }
247
+ }
248
+ ```
249
+
250
+ 4. **Restart Claude Desktop** and test
251
+
252
+ ### Why pipx for macOS?
253
+
254
+ Claude Desktop on macOS cannot access virtual environments in protected folders (like `~/Documents`) due to security restrictions. pipx installs to `~/.local/` which is accessible.
255
+
256
+ ### Running Tests
257
+
258
+ ```bash
259
+ pytest
260
+ ```
261
+
262
+ ### Code Quality
263
+
264
+ ```bash
265
+ ruff check src/ # Linting
266
+ mypy src/ # Type checking
267
+ ```
268
+
269
+ ### Project Structure
270
+
271
+ ```
272
+ src/prometheux_mcp/
273
+ ├── __init__.py # Package exports
274
+ ├── __main__.py # CLI entry point (Click-based)
275
+ ├── config.py # Configuration management
276
+ ├── client.py # HTTP client for Prometheux API
277
+ ├── server.py # MCP server and tool definitions
278
+ └── tools/ # Reserved for future tool modules
279
+ ```
280
+
281
+ ### Building for PyPI
282
+
283
+ ```bash
284
+ python -m build
285
+ twine upload dist/*
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Tool Reference
291
+
292
+ ### `list_concepts`
293
+
294
+ Lists all concepts available in a project.
295
+
296
+ **Parameters:**
297
+ | Parameter | Type | Required | Default | Description |
298
+ |-----------|------|----------|---------|-------------|
299
+ | `project_id` | string | Yes | — | Project identifier |
300
+ | `scope` | string | No | `"user"` | `"user"` or `"organization"` |
301
+
302
+ **Example response:**
303
+ ```json
304
+ {
305
+ "concepts": [
306
+ {
307
+ "predicate_name": "customer",
308
+ "fields": {"id": "string", "name": "string"},
309
+ "column_count": 2,
310
+ "is_input": true,
311
+ "row_count": 1000,
312
+ "type": "postgresql",
313
+ "description": "Customer records"
314
+ }
315
+ ],
316
+ "count": 1
317
+ }
318
+ ```
319
+
320
+ ### `run_concept`
321
+
322
+ Executes a concept to derive new knowledge through Vadalog reasoning.
323
+
324
+ **Parameters:**
325
+ | Parameter | Type | Required | Default | Description |
326
+ |-----------|------|----------|---------|-------------|
327
+ | `project_id` | string | Yes | — | Project identifier |
328
+ | `concept_name` | string | Yes | — | Concept to execute |
329
+ | `params` | object | No | `{}` | Parameters for reasoning |
330
+ | `scope` | string | No | `"user"` | `"user"` or `"organization"` |
331
+ | `force_rerun` | boolean | No | `true` | Re-execute even if cached |
332
+ | `persist_outputs` | boolean | No | `false` | Save results to database |
333
+
334
+ **Example response:**
335
+ ```json
336
+ {
337
+ "concept_name": "high_value_customers",
338
+ "message": "Concept executed successfully",
339
+ "evaluation_results": {
340
+ "resultSet": {
341
+ "high_value_customers": [["Alice", 5000], ["Bob", 3000]]
342
+ },
343
+ "columnNames": {
344
+ "high_value_customers": ["name", "total_value"]
345
+ }
346
+ },
347
+ "predicates_populated": ["high_value_customers"],
348
+ "total_records": 2
349
+ }
350
+ ```
351
+
352
+ ---
353
+
354
+ ## Access to Prometheux Backend
355
+
356
+ The Prometheux backend is required to use this MCP client. To request access:
357
+
358
+ - 📧 **Email**: davben@prometheux.co.uk, teodoro.baldazzi@prometheux.co.uk, or support@prometheux.co.uk
359
+ - 🌐 **Website**: https://www.prometheux.ai
360
+
361
+ ## License
362
+
363
+ BSD 3-Clause License — see [LICENSE](LICENSE) file for details.
364
+
365
+ ## About Prometheux
366
+
367
+ Prometheux is an **ontology native data engine** that processes data anywhere it lives. Define ontologies once and unlock knowledge that spans databases, warehouses, and platforms—built on the Vadalog reasoning engine.
368
+
369
+ **Key capabilities:**
370
+ - **Connect**: Query across Snowflake, Databricks, Neo4j, SQL, CSV, and more without ETL or vendor lock-in
371
+ - **Think**: Replace 100+ lines of PySpark/SQL with simple declarative logic. Power graph analytics without GraphDBs
372
+ - **Explain**: Full lineage & traceability with deterministic, repeatable results. Ground AI in structured, explainable context
373
+
374
+ Exponentially faster and simpler than traditional approaches. Learn more at [prometheux.ai](https://prometheux.ai/).
375
+
376
+ ## Support
377
+
378
+ For issues, questions, or access requests:
379
+
380
+ - **Homepage**: https://www.prometheux.ai
381
+ - **PyPI**: https://pypi.org/project/prometheux-mcp/
382
+ - **Email**: davben@prometheux.co.uk, teodoro.baldazzi@prometheux.co.uk, or support@prometheux.co.uk
383
+ - **Documentation**: https://docs.prometheux.ai/mcp
384
+ - **Issues**: [GitHub Issues](https://github.com/prometheuxresearch/px-mcp-server/issues)
385
+
386
+ ## Related Projects
387
+
388
+ - [Prometheux Chain](https://pypi.org/project/prometheux-chain/) — Python SDK for Prometheux
389
+ - [Vadalog Extension](https://pypi.org/project/vadalog-extension/) — JupyterLab extension for Vadalog
390
+ - [Vadalog Jupyter Kernel](https://pypi.org/project/vadalog-jupyter-kernel/) — Jupyter kernel for Vadalog