@openbiox/bizard-mcp 0.1.1 → 0.1.3
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.
- package/README.md +45 -8
- package/dist/server.js +12 -4
- package/dist/snapshot/bundle.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @openbiox/bizard-mcp
|
|
2
2
|
|
|
3
3
|
A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for
|
|
4
|
-
the [Bizard](https://
|
|
4
|
+
the [Bizard](https://openbiox.github.io/Bizard/) biomedical visualization
|
|
5
|
+
atlas ([GitHub](https://github.com/openbiox/Bizard)). It serves the
|
|
5
6
|
full chart lifecycle over MCP: **query** (bilingual search across 800+ chart
|
|
6
7
|
tutorials), **use** (runnable code, dependencies, data URLs, and structured
|
|
7
8
|
adaptation guidance the host AI executes), **cite** (BibTeX/DOI metadata with
|
|
@@ -10,28 +11,37 @@ degrades gracefully by environment). Content comes from a bundle generated by
|
|
|
10
11
|
CI from the same sources as the website and `SKILL.md`, so all three never
|
|
11
12
|
drift. The server never executes plotting code — the host AI does.
|
|
12
13
|
|
|
13
|
-
## Quickstart
|
|
14
|
+
## Quickstart
|
|
15
|
+
|
|
16
|
+
No install at all — connect to the [public hosted instance](#public-hosted-instance-no-install-required)
|
|
17
|
+
(pure Streamable HTTP, works with any MCP-capable agent).
|
|
18
|
+
|
|
19
|
+
Local, stdio (works offline — an npm-shipped content snapshot backs everything up):
|
|
14
20
|
|
|
15
21
|
```bash
|
|
16
22
|
npx @openbiox/bizard-mcp
|
|
17
23
|
```
|
|
18
24
|
|
|
19
|
-
Register
|
|
25
|
+
Register the local server with Claude Code:
|
|
20
26
|
|
|
21
27
|
```bash
|
|
22
28
|
claude mcp add bizard -- npx @openbiox/bizard-mcp
|
|
23
29
|
```
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
Hosted instance with Claude Code:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
claude mcp add --transport http bizard http://biotree.top:38123/bizard-mcp/mcp
|
|
35
|
+
```
|
|
26
36
|
|
|
27
37
|
## Tools
|
|
28
38
|
|
|
29
39
|
| Tool | Purpose |
|
|
30
40
|
|------|---------|
|
|
31
41
|
| `bizard_search` | Bilingual weighted search over the chart gallery; adjacent-category suggestions on zero hits |
|
|
32
|
-
| `bizard_list_categories` |
|
|
33
|
-
| `bizard_get_tutorial` |
|
|
34
|
-
| `bizard_get_code` | Runnable tutorial code with package list,
|
|
42
|
+
| `bizard_list_categories` | All 36 chart categories with per-category chart counts (bilingual names where available) |
|
|
43
|
+
| `bizard_get_tutorial` | Chart metadata: packages, example-data URLs, available languages, tutorial link |
|
|
44
|
+
| `bizard_get_code` | Runnable tutorial code with package list, example-data URLs, and license notice |
|
|
35
45
|
| `bizard_adapt_guidance` | Data-shape checks, dependency prep, parameter mapping, failure modes, alternatives |
|
|
36
46
|
| `bizard_cite` | Bizard paper + tutorial citation (bibtex/text/json) with CC-BY-NC-4.0 license notice |
|
|
37
47
|
| `bizard_contribute_check` | Validate a draft against the contribution template; preview points (issue #4) |
|
|
@@ -47,6 +57,33 @@ One package, two transports:
|
|
|
47
57
|
- **Local (stdio, default)**: `npx @openbiox/bizard-mcp`. Full capability; contribution runs at level 1/2 when local credentials exist.
|
|
48
58
|
- **Hosted (Streamable HTTP)**: `npx @openbiox/bizard-mcp --http`. Port via `BIZARD_HTTP_PORT` (default 3000). Anonymous, stateless — each POST to `/mcp` gets a fresh transport. Per-IP token-bucket rate limit (60 req/min; 429 with `Retry-After`). Contribution runs at level 3 (no credentials on the server).
|
|
49
59
|
|
|
60
|
+
### Public hosted instance (no install required)
|
|
61
|
+
|
|
62
|
+
A community instance is deployed by the Bizard team. It speaks standard
|
|
63
|
+
Streamable HTTP, so **any MCP-capable agent** can connect — Claude Code,
|
|
64
|
+
Cursor, Cline, Windsurf, VS Code Copilot Chat, custom agent frameworks —
|
|
65
|
+
with no local install. It may also be faster than an npm-based setup for
|
|
66
|
+
users in mainland China.
|
|
67
|
+
|
|
68
|
+
Most MCP clients accept a JSON server entry:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"bizard": { "type": "http", "url": "http://biotree.top:38123/bizard-mcp/mcp" }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Claude Code accepts it from the CLI too:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
claude mcp add --transport http bizard http://biotree.top:38123/bizard-mcp/mcp
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Same anonymous, stateless, rate-limited behavior as the self-hosted HTTP
|
|
85
|
+
mode; contribution runs at level 3 (the instance holds no credentials).
|
|
86
|
+
|
|
50
87
|
## Contribution credential degradation
|
|
51
88
|
|
|
52
89
|
`bizard_contribute_submit` probes the environment on every call and states
|
|
@@ -54,7 +91,7 @@ which level it used — never silently failing:
|
|
|
54
91
|
|
|
55
92
|
| Level | Condition | Behavior |
|
|
56
93
|
|-------|-----------|----------|
|
|
57
|
-
| 1 | `gh` CLI installed and logged in | Creates issue (
|
|
94
|
+
| 1 | `gh` CLI installed and logged in | Creates the issue as your GitHub user (PR submission is planned for a future release) |
|
|
58
95
|
| 2 | No `gh`, but `GITHUB_TOKEN` set | GitHub API submission, limited by token scope |
|
|
59
96
|
| 3 | Neither (typical for hosted) | Returns formatted draft + pre-filled `issues/new?title=&body=` deep-link |
|
|
60
97
|
|
package/dist/server.js
CHANGED
|
@@ -13,9 +13,17 @@ const QUERY_MAX_CHARS = 4000;
|
|
|
13
13
|
export const NO_BUNDLE_ERROR = "bizard-mcp: bundle snapshot unavailable. The maintainer must run " +
|
|
14
14
|
"`npm run build:bundle` (or CI) to generate src/snapshot/bundle.json, then rebuild.";
|
|
15
15
|
function json(value, note) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
// Arrays must be serialized as arrays: spreading an array into an object
|
|
17
|
+
// literal ({...arr}) yields numeric-string keys and breaks client-side
|
|
18
|
+
// .map()/.length. Wrap noted arrays as {note, items} so `.note` stays
|
|
19
|
+
// accessible for the one-time update notice (see notice-wiring tests).
|
|
20
|
+
let payload;
|
|
21
|
+
if (note === null || note === undefined) {
|
|
22
|
+
payload = Array.isArray(value) ? value : { ...value };
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
payload = Array.isArray(value) ? { note, items: value } : { note, ...value };
|
|
26
|
+
}
|
|
19
27
|
return {
|
|
20
28
|
content: [{
|
|
21
29
|
type: "text",
|
|
@@ -30,7 +38,7 @@ function bundleError() {
|
|
|
30
38
|
};
|
|
31
39
|
}
|
|
32
40
|
/** Constant server identity — never derives from bundle state. */
|
|
33
|
-
const SERVER_IDENTITY = { name: "bizard-mcp", version: "0.1.
|
|
41
|
+
const SERVER_IDENTITY = { name: "bizard-mcp", version: "0.1.3" };
|
|
34
42
|
export function createBizardServer(source, notices, opts) {
|
|
35
43
|
const getBundle = () => {
|
|
36
44
|
if (source === null)
|
package/package.json
CHANGED