Skip to content

Commit 9dca40a

Browse files
GML-2208 Add a plugin README and build conda from the PyPI release (#7)
* Add a README to the Claude Code plugin - Describe requirements, install, and configuration options - Disclose what the plugin downloads, connects to, and reads * Build the conda package from the PyPI release - Use the source package published on PyPI, so conda and PyPI ship the same files - Fail with a clear message when the version isn't on PyPI - Fail when the recipe version doesn't match the tag
1 parent f560caa commit 9dca40a

2 files changed

Lines changed: 106 additions & 15 deletions

File tree

‎.github/workflows/publish-conda.yml‎

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,53 @@ jobs:
4747
exit 1
4848
fi
4949
50-
- name: Build sdist locally
50+
# Build conda from the sdist published on PyPI, so both channels ship
51+
# the same artifact. PyPI is uploaded by hand, so wait for the version
52+
# to appear rather than racing the upload or its propagation.
53+
- name: Point recipe at the PyPI sdist
54+
env:
55+
VERSION: ${{ steps.tag.outputs.version }}
5156
run: |
52-
python -m pip install --upgrade pip build
53-
python -m build --sdist
57+
python - <<'PY'
58+
import json, os, pathlib, re, sys, time, urllib.error, urllib.request
5459
55-
# Build conda from the local sdist to avoid the PyPI propagation race.
56-
- name: Rewrite recipe to build from local sdist
57-
run: |
58-
VERSION="${{ steps.tag.outputs.version }}"
59-
SDIST="$PWD/dist/tigergraph_mcp-${VERSION}.tar.gz"
60-
[[ -f "$SDIST" ]] || { echo "::error::Sdist not found at $SDIST"; exit 1; }
61-
SHA=$(shasum -a 256 "$SDIST" | awk '{print $1}')
62-
python - <<PY
63-
import pathlib, re
60+
version = os.environ["VERSION"]
61+
api = f"https://pypi.org/pypi/tigergraph-mcp/{version}/json"
62+
deadline = time.time() + 30 * 60
63+
while True:
64+
try:
65+
with urllib.request.urlopen(api, timeout=30) as r:
66+
files = json.load(r)["urls"]
67+
sdist = next((f for f in files if f["packagetype"] == "sdist"), None)
68+
if sdist:
69+
break
70+
except urllib.error.HTTPError as e:
71+
if e.code != 404:
72+
raise
73+
if time.time() > deadline:
74+
print(f"::error::tigergraph-mcp {version} sdist is not on PyPI. "
75+
"Upload it with ./build.sh --upload, then re-run this workflow.")
76+
sys.exit(1)
77+
print(f"tigergraph-mcp {version} sdist not on PyPI yet; retrying in 60s")
78+
time.sleep(60)
79+
80+
print(f"Using {sdist['url']}")
6481
p = pathlib.Path("tigergraph-mcp-recipe/recipe/meta.yaml")
6582
t = p.read_text()
66-
t = re.sub(r'^\{% set version = ".*" %\}', f'{{% set version = "${{ steps.tag.outputs.version }}" %}}', t, count=1, flags=re.M)
67-
t = re.sub(
83+
m = re.search(r'^\{% set version = "(.*)" %\}', t, flags=re.M)
84+
if not m or m.group(1) != version:
85+
print(f"::error::meta.yaml version ({m and m.group(1)}) does not match tag version ({version}).")
86+
sys.exit(1)
87+
t, n = re.subn(
6888
r'^source:\n(?: .*\n)+',
69-
f'source:\n url: file://${SDIST}\n sha256: ${SHA}\n',
89+
f"source:\n url: {sdist['url']}\n sha256: {sdist['digests']['sha256']}\n",
7090
t, count=1, flags=re.M,
7191
)
92+
if n != 1:
93+
print("::error::No source block found in meta.yaml")
94+
sys.exit(1)
7295
p.write_text(t)
96+
print(re.search(r'^source:\n(?: .*\n)+', t, flags=re.M).group(0))
7397
PY
7498
7599
- name: Set up Miniconda

‎plugins/tigergraph/README.md‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# TigerGraph
2+
3+
Connect Claude to any TigerGraph deployment — self-managed, on-premise, or a TigerGraph
4+
Savanna instance — using your own host and credentials. Claude can explore and evolve the
5+
graph schema, read and write vertices and edges, run GSQL and Cypher queries, install and
6+
run stored queries, load data from files and data sources, and search vector embeddings.
7+
8+
The plugin runs the open-source [tigergraph-mcp](https://github.com/tigergraph/tigergraph-mcp)
9+
server on your machine. It works in Claude Code.
10+
11+
## Requirements
12+
13+
- [uv](https://docs.astral.sh/uv/) on your `PATH`. The plugin starts the server with `uvx`,
14+
which also provides a suitable Python if one isn't installed.
15+
- A TigerGraph instance you can reach from your machine, and an account on it.
16+
17+
## Install
18+
19+
```bash
20+
claude plugin marketplace add tigergraph/tigergraph-mcp
21+
claude plugin install tigergraph@tigergraph
22+
```
23+
24+
## Configuration
25+
26+
At install time, Claude Code asks for:
27+
28+
| Option | Required | Description |
29+
|---|---|---|
30+
| TigerGraph host | Yes | Host URL of the instance, for example `https://mycompany.i.tgcloud.io` |
31+
| Username | No | Account to connect as. Defaults to `tigergraph` |
32+
| Password | No | Password for that account |
33+
| Default graph | No | Graph to use when a request doesn't name one |
34+
| API token | No | Used instead of the password when set |
35+
| Tools to offer | No | Limits which tools Claude can use, such as `read-only`. Empty offers all of them |
36+
37+
The password and API token are kept in secure storage, not in a settings file. To change
38+
any option later, open `/plugin`, select **TigerGraph (Self-Managed MCP)** on the
39+
**Installed** tab, and choose **Configure options**.
40+
41+
## What the plugin runs and sends
42+
43+
- **Download:** when it starts, `uvx` downloads the pinned `tigergraph-mcp` package and its
44+
dependencies from PyPI, then caches them.
45+
- **Network:** the server connects only to the TigerGraph host you configure. It sends that
46+
host your credentials and the requests Claude makes.
47+
- **Local files:** the tools that load data or vectors from a file read the file path Claude
48+
gives them and send its contents to your TigerGraph host.
49+
- **Environment:** the server also reads a `.env` file from the working directory or a parent
50+
directory, if one exists. Options entered at install take precedence over it.
51+
- **No telemetry:** the plugin doesn't collect usage data or send anything to TigerGraph or
52+
other third parties. The query-generation tools, which call an LLM provider, aren't
53+
available in the plugin.
54+
55+
## Permissions
56+
57+
In permission rules, a skill's `allowed-tools`, or a hook matcher, the plugin's server is
58+
named `plugin:tigergraph:tigergraph`.
59+
60+
## Documentation and support
61+
62+
- Full documentation: <https://github.com/tigergraph/tigergraph-mcp#readme>
63+
- Issues: <https://github.com/tigergraph/tigergraph-mcp/issues>
64+
65+
## License
66+
67+
Apache-2.0

0 commit comments

Comments
 (0)