Skip to content

Commit 3d7646d

Browse files
committed
Rename to pyTigerGraph-mcp to avoid conflict
1 parent 6acc6d2 commit 3d7646d

21 files changed

Lines changed: 159 additions & 133 deletions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pip install pyTigerGraph
2121
| Extra | What it adds | Install command |
2222
|-------|-------------|-----------------|
2323
| `gds` | Graph Data Science — data loaders for PyTorch Geometric, DGL, and Pandas | `pip install 'pyTigerGraph[gds]'` |
24-
| `mcp` | Model Context Protocol server — installs [`tigergraph-mcp`](https://github.com/tigergraph/tigergraph-mcp) (convenience alias) | `pip install 'pyTigerGraph[mcp]'` |
24+
| `mcp` | Model Context Protocol server — installs [`pyTigerGraph-mcp`](https://github.com/tigergraph/tigergraph-mcp) (convenience alias) | `pip install 'pyTigerGraph[mcp]'` |
2525
| `fast` | [orjson](https://github.com/ijl/orjson) JSON backend — 2–10× faster parsing, releases the GIL under concurrent load | `pip install 'pyTigerGraph[fast]'` |
2626

2727
Extras can be combined:
@@ -192,20 +192,20 @@ See the [GDS documentation](https://docs.tigergraph.com/pytigergraph/current/gds
192192

193193
## MCP Server
194194

195-
The TigerGraph MCP server is now a standalone package: **[tigergraph-mcp](https://github.com/tigergraph/tigergraph-mcp)**. It exposes TigerGraph operations as tools for AI agents and LLM applications (Claude Desktop, Cursor, Copilot, etc.).
195+
The TigerGraph MCP server is now a standalone package: **[pyTigerGraph-mcp](https://github.com/tigergraph/tigergraph-mcp)**. It exposes TigerGraph operations as tools for AI agents and LLM applications (Claude Desktop, Cursor, Copilot, etc.).
196196

197197
```sh
198198
# Recommended — install the standalone package directly
199-
pip install tigergraph-mcp
199+
pip install pyTigerGraph-mcp
200200

201-
# Or via the pyTigerGraph convenience alias (installs tigergraph-mcp automatically)
201+
# Or via the pyTigerGraph convenience alias (installs pyTigerGraph-mcp automatically)
202202
pip install 'pyTigerGraph[mcp]'
203203

204204
# Start the server (reads connection config from environment variables)
205205
tigergraph-mcp
206206
```
207207

208-
For full setup instructions, available tools, configuration examples, and multi-profile support, see the **[tigergraph-mcp README](https://github.com/tigergraph/tigergraph-mcp#readme)**.
208+
For full setup instructions, available tools, configuration examples, and multi-profile support, see the **[pyTigerGraph-mcp README](https://github.com/tigergraph/tigergraph-mcp#readme)**.
209209

210210
> **Migrating from `pyTigerGraph.mcp`?** Update your imports:
211211
> ```python

pyTigerGraph/mcp/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# Licensed under the Apache License, Version 2.0.
33
# See the LICENSE file or https://www.apache.org/licenses/LICENSE-2.0
44

5-
"""Deprecated MCP shim — the MCP server has moved to the `tigergraph-mcp` package.
5+
"""Deprecated MCP shim — the MCP server has moved to the `pyTigerGraph-mcp` package.
66
77
Install the standalone package::
88
9-
pip install tigergraph-mcp
9+
pip install pyTigerGraph-mcp
1010
11-
Or continue using the convenience alias (which installs `tigergraph-mcp` automatically)::
11+
Or continue using the convenience alias (which installs `pyTigerGraph-mcp` automatically)::
1212
1313
pip install pyTigerGraph[mcp]
1414
@@ -25,8 +25,8 @@
2525

2626
warnings.warn(
2727
"pyTigerGraph.mcp is deprecated and will be removed in a future release. "
28-
"The MCP server now lives in the 'tigergraph-mcp' package. "
29-
"Install it with: pip install tigergraph-mcp "
28+
"The MCP server now lives in the 'pyTigerGraph-mcp' package. "
29+
"Install it with: pip install pyTigerGraph-mcp "
3030
"Update imports from 'pyTigerGraph.mcp' to 'tigergraph_mcp'.",
3131
DeprecationWarning,
3232
stacklevel=2,
@@ -37,7 +37,7 @@
3737
except ImportError as e:
3838
raise ImportError(
3939
"Could not import 'tigergraph_mcp'. "
40-
"Install it with: pip install tigergraph-mcp"
40+
"Install it with: pip install pyTigerGraph-mcp"
4141
) from e
4242

4343
__all__ = [

pyTigerGraph/pyTigerGraphAuth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def checkJwtToken(self, token: str = None) -> dict:
573573

574574
data = {"token": token}
575575
res = self._post(self.gsUrl+"/gsql/v1/tokens/check",
576-
data=data, authMode="pwd", resKey="",
576+
data=data, authMode="pwd", resKey=None,
577577
headers={'Content-Type': 'application/json'})
578578

579579
if logger.level == logging.DEBUG:

pyTigerGraph/pyTigerGraphBase.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,14 +363,27 @@ def _put(self, url: str, authMode: str = "token", data=None, resKey=None, jsonDa
363363

364364
return res
365365

366-
def _delete(self, url: str, authMode: str = "token", data: dict = None, resKey="results", jsonData=False) -> Union[dict, list]:
366+
def _delete(self, url: str, authMode: str = "token", headers: dict = None,
367+
data: dict = None, resKey="results", skipCheck: bool = False,
368+
params: Union[dict, list, str] = None, jsonData=False) -> Union[dict, list]:
367369
"""Generic DELETE method.
368370
369371
Args:
370372
url:
371373
Complete REST++ API URL including path and parameters.
372374
authMode:
373375
Authentication mode, either `"token"` (default) or `"pwd"`.
376+
headers:
377+
Standard HTTP request headers.
378+
data:
379+
Request payload, typically a JSON document.
380+
resKey:
381+
The JSON subdocument to be returned, default is `"results"`.
382+
skipCheck:
383+
Some endpoints return an error to indicate that the requested
384+
action is not applicable. This argument skips error checking.
385+
params:
386+
Request URL parameters.
374387
375388
Returns:
376389
The response from the request (as a dictionary).
@@ -379,8 +392,8 @@ def _delete(self, url: str, authMode: str = "token", data: dict = None, resKey="
379392
if logger.level == logging.DEBUG:
380393
logger.debug("params: " + self._locals(locals()))
381394

382-
res = self._req("DELETE", url, authMode, data=data,
383-
resKey=resKey, jsonData=jsonData)
395+
res = self._req("DELETE", url, authMode, headers, data,
396+
resKey, skipCheck, params, jsonData=jsonData)
384397

385398
if logger.level == logging.DEBUG:
386399
logger.debug("return: " + str(res))

pyTigerGraph/pyTigerGraphEdge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def getEdgeStats(self, edgeTypes: Union[str, list], skipNA: bool = False) -> dic
849849
for et in ets:
850850
data = '{"function":"stat_edge_attr","type":"' + \
851851
et + '","from_type":"*","to_type":"*"}'
852-
res = self._req("POST", self.restppUrl + "/builtins/" + self.graphname, data=data, resKey="",
852+
res = self._req("POST", self.restppUrl + "/builtins/" + self.graphname, data=data, resKey=None,
853853
skipCheck=True)
854854
responses.append((et, res))
855855
ret = _parse_get_edge_stats(responses, skipNA)

pyTigerGraph/pyTigerGraphGSQL.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ def installUDF(self, ExprFunctions: str = "", ExprUtil: str = "") -> None:
9999
if self._versionGreaterThan4_0():
100100
res = self._req("PUT",
101101
url="{}/gsql/v1/udt/files/ExprFunctions".format(
102-
self.gsUrl), authMode="pwd", data=data, resKey="")
102+
self.gsUrl), authMode="pwd", data=data, resKey=None)
103103
else:
104104
res = self._req("PUT",
105105
url="{}/gsqlserver/gsql/userdefinedfunction?filename=ExprFunctions".format(
106-
self.gsUrl), authMode="pwd", data=data, resKey="")
106+
self.gsUrl), authMode="pwd", data=data, resKey=None)
107107
if not res["error"]:
108108
logger.info("ExprFunctions installed successfully")
109109
else:
@@ -122,12 +122,12 @@ def installUDF(self, ExprFunctions: str = "", ExprUtil: str = "") -> None:
122122
res = self._req("PUT",
123123
url="{}/gsql/v1/udt/files/ExprUtil".format(
124124
self.gsUrl),
125-
authMode="pwd", data=data, resKey="")
125+
authMode="pwd", data=data, resKey=None)
126126
else:
127127
res = self._req("PUT",
128128
url="{}/gsqlserver/gsql/userdefinedfunction?filename=ExprUtil".format(
129129
self.gsUrl),
130-
authMode="pwd", data=data, resKey="")
130+
authMode="pwd", data=data, resKey=None)
131131
if not res["error"]:
132132
logger.info("ExprUtil installed successfully")
133133
else:
@@ -176,7 +176,7 @@ def getUDF(self, ExprFunctions: bool = True, ExprUtil: bool = True, json_out=Fal
176176

177177
for file_name in urls:
178178
resp = self._req(
179-
"GET", f"{self.gsUrl}{urls[file_name]}", resKey="")
179+
"GET", f"{self.gsUrl}{urls[file_name]}", resKey=None)
180180
responses[file_name] = resp
181181

182182
return _parse_get_udf(responses, json_out=json_out)
@@ -204,7 +204,7 @@ def getAsyncRequestStatus(self, requestId: str) -> dict:
204204
logger.debug("params: " + self._locals(locals()))
205205

206206
res = self._get(self.gsUrl+"/gsql/v1/statements/"+requestId,
207-
authMode="pwd", resKey="", headers={'Content-Type': 'application/json'})
207+
authMode="pwd", resKey=None, headers={'Content-Type': 'application/json'})
208208

209209
if logger.level == logging.DEBUG:
210210
logger.debug("return: " + str(res))
@@ -235,7 +235,7 @@ def cancelAsyncRequest(self, requestId: str) -> dict:
235235
logger.debug("params: " + self._locals(locals()))
236236

237237
res = self._put(self.gsUrl+"/gsql/v1/statements/"+requestId+"/cancel",
238-
authMode="pwd", resKey="", headers={'Content-Type': 'application/json'})
238+
authMode="pwd", resKey=None, headers={'Content-Type': 'application/json'})
239239

240240
if logger.level == logging.DEBUG:
241241
logger.debug("return: " + str(res))
@@ -262,7 +262,7 @@ def recoverCatalog(self) -> dict:
262262
"This function is only supported on versions of TigerGraph >= 4.0.", 0)
263263

264264
res = self._post(self.gsUrl+"/gsql/v1/schema/recover",
265-
authMode="pwd", resKey="", headers={'Content-Type': 'text/plain'})
265+
authMode="pwd", resKey=None, headers={'Content-Type': 'text/plain'})
266266

267267
if logger.level == logging.DEBUG:
268268
logger.debug("return: " + str(res))
@@ -295,7 +295,7 @@ def clearGraphStore(self) -> dict:
295295
"This function is only supported on versions of TigerGraph >= 4.0.", 0)
296296

297297
res = self._get(self.gsUrl+"/gsql/v1/clear-store",
298-
authMode="pwd", resKey="", headers={'Content-Type': 'application/json'})
298+
authMode="pwd", resKey=None, headers={'Content-Type': 'application/json'})
299299

300300
if logger.level == logging.DEBUG:
301301
logger.debug("return: " + str(res))
@@ -328,7 +328,7 @@ def dropAll(self) -> dict:
328328
"This function is only supported on versions of TigerGraph >= 4.0.", 0)
329329

330330
res = self._get(self.gsUrl+"/gsql/v1/drop-all",
331-
authMode="pwd", resKey="", headers={'Content-Type': 'application/json'})
331+
authMode="pwd", resKey=None, headers={'Content-Type': 'application/json'})
332332

333333
if logger.level == logging.DEBUG:
334334
logger.debug("return: " + str(res))
@@ -397,7 +397,7 @@ def exportDatabase(self, path: str, graphNames: list = None, schema: bool = Fals
397397
data["password"] = password
398398

399399
res = self._post(self.gsUrl+"/gsql/v1/db-export",
400-
data=data, authMode="pwd", resKey="",
400+
data=data, authMode="pwd", resKey=None,
401401
headers={'Content-Type': 'application/json'})
402402

403403
if logger.level == logging.DEBUG:
@@ -451,7 +451,7 @@ def importDatabase(self, path: str, graphNames: list = None, keepUsers: bool = F
451451
data["password"] = password
452452

453453
res = self._post(self.gsUrl+"/gsql/v1/db-import",
454-
data=data, authMode="pwd", resKey="",
454+
data=data, authMode="pwd", resKey=None,
455455
headers={'Content-Type': 'application/json'})
456456

457457
if logger.level == logging.DEBUG:
@@ -487,7 +487,7 @@ def getGSQLVersion(self, verbose: bool = False) -> dict:
487487
params["verbose"] = verbose
488488

489489
res = self._get(self.gsUrl+"/gsql/v1/version",
490-
params=params, authMode="pwd", resKey="",
490+
params=params, authMode="pwd", resKey=None,
491491
headers={'Content-Type': 'text/plain'})
492492

493493
if logger.level == logging.DEBUG:

pyTigerGraph/pyTigerGraphLoading.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def getLoadingJobs(self) -> dict:
219219

220220
url = _prep_loading_job_url(self.gsUrl, self.graphname)
221221

222-
res = self._req("GET", url)
222+
res = self._req("GET", url, resKey="jobNames")
223223

224224
logger.debug("return: " + str(res))
225225
logger.debug("exit: getLoadingJobs")
@@ -243,7 +243,7 @@ def createLoadingJob(self, job_definition: str) -> dict:
243243

244244
url = _prep_loading_job_url(self.gsUrl, self.graphname)
245245

246-
res = self._req("POST", url, data=job_definition)
246+
res = self._req("POST", url, data=job_definition, resKey=None)
247247

248248
logger.debug("return: " + str(res))
249249
logger.debug("exit: createLoadingJob")
@@ -267,7 +267,7 @@ def updateLoadingJob(self, job_definition: str) -> dict:
267267

268268
url = _prep_loading_job_url(self.gsUrl, self.graphname)
269269

270-
res = self._req("PUT", url, data=job_definition)
270+
res = self._req("PUT", url, data=job_definition, resKey=None)
271271

272272
logger.debug("return: " + str(res))
273273
logger.debug("exit: updateLoadingJob")
@@ -332,7 +332,7 @@ def runLoadingJob(self, jobName: str, data_source_config: dict, sys_data_root: s
332332

333333
url, data = _prep_run_loading_job(self.gsUrl, self.graphname, jobName, data_source_config, sys_data_root, verbose, dryrun, interval, maxNumError, maxPercentError)
334334

335-
res = self._req("POST", url, data=data)
335+
res = self._req("POST", url, data=data, resKey=None)
336336

337337
logger.debug("return: " + str(res))
338338
logger.debug("exit: runLoadingJob")
@@ -358,7 +358,7 @@ def dropLoadingJob(self, jobName: str) -> dict:
358358

359359
if self._version_greater_than_4_0():
360360
url = _prep_loading_job_info(self.gsUrl, jobName, self.graphname)
361-
res = self._req("DELETE", url)
361+
res = self._req("DELETE", url, resKey=None)
362362
else:
363363
res = _wrap_gsql_result(self.gsql(f"USE GRAPH {self.graphname}\nDROP JOB {jobName}"))
364364

@@ -386,7 +386,7 @@ def abortLoadingJobs(self, jobIds: list[str], pauseJob: bool = False) -> dict:
386386

387387
url = _prep_abort_loading_jobs(self.gsUrl, self.graphname, jobIds, pauseJob)
388388

389-
res = self._req("GET", url)
389+
res = self._req("GET", url, resKey=None)
390390

391391
logger.debug("return: " + str(res))
392392
logger.debug("exit: abortLoadingJobs")
@@ -412,7 +412,7 @@ def abortLoadingJob(self, jobId: str, pauseJob: bool = False) -> dict:
412412

413413
url = _prep_abort_one_loading_job(self.gsUrl, self.graphname, jobId, pauseJob)
414414

415-
res = self._req("GET", url)
415+
res = self._req("GET", url, resKey=None)
416416

417417
logger.debug("return: " + str(res))
418418
logger.debug("exit: abortLoadingJob")
@@ -436,7 +436,7 @@ def resumeLoadingJob(self, jobId: str) -> dict:
436436

437437
url = _prep_resume_loading_job(self.gsUrl, jobId)
438438

439-
res = self._req("GET", url)
439+
res = self._req("GET", url, resKey=None)
440440

441441
logger.debug("return: " + str(res))
442442
logger.debug("exit: resumeLoadingJob")

0 commit comments

Comments
 (0)