oboelib-cli 0.0.0-stage → 1.0.0
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/LICENSE +3 -0
- package/README.md +36 -2
- package/bin/oboelib.mjs +56 -0
- package/package.json +40 -4
package/LICENSE
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# oboelib-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official zero-dependency terminal CLI and Model Context Protocol (MCP) client for **[OboeLib (oboelib.com)](https://oboelib.com)**.
|
|
4
|
+
|
|
5
|
+
## Quick Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# List all available MCP tools
|
|
9
|
+
npx oboelib-cli tools
|
|
10
|
+
|
|
11
|
+
# Run a live sample query
|
|
12
|
+
npx oboelib-cli demo
|
|
13
|
+
|
|
14
|
+
# Call a specific tool with JSON arguments
|
|
15
|
+
npx oboelib-cli call lookup_oboe_fingering '{"note":"F4"}'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Connect in Claude Desktop / Cursor / Windsurf
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"oboelib": {
|
|
24
|
+
"type": "streamable-http",
|
|
25
|
+
"url": "https://oboelib.com/api/mcp"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Official Web Tools & Documentation
|
|
32
|
+
|
|
33
|
+
- **[OboeLib Official Studio](https://oboelib.com)** (https://oboelib.com)
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
MIT © [OboeLib](https://oboelib.com)
|
package/bin/oboelib.mjs
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const ENDPOINT = 'https://oboelib.com/api/mcp';
|
|
3
|
+
|
|
4
|
+
async function rpc(method, params = {}) {
|
|
5
|
+
const res = await fetch(ENDPOINT, {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
headers: { 'Content-Type': 'application/json', 'Accept': 'application/json, text/event-stream' },
|
|
8
|
+
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params })
|
|
9
|
+
});
|
|
10
|
+
if (!res.ok) throw new Error('HTTP ' + res.status + ' from ' + ENDPOINT);
|
|
11
|
+
const txt = await res.text();
|
|
12
|
+
if (txt.startsWith('event:') || txt.includes('\ndata:')) {
|
|
13
|
+
const m = txt.match(/data:\s*(\{.*\})/);
|
|
14
|
+
if (m) return JSON.parse(m[1]);
|
|
15
|
+
}
|
|
16
|
+
return JSON.parse(txt);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function main() {
|
|
20
|
+
const [cmd, arg1, arg2] = process.argv.slice(2);
|
|
21
|
+
if (!cmd || cmd === '--help' || cmd === '-h' || cmd === 'help') {
|
|
22
|
+
console.log('OboeLib CLI v1.0.0 — Official Terminal & MCP Client');
|
|
23
|
+
console.log('Website: https://oboelib.com');
|
|
24
|
+
console.log('MCP URL: ' + ENDPOINT);
|
|
25
|
+
console.log('\nUsage:');
|
|
26
|
+
console.log(' npx oboelib-cli tools List available MCP tools');
|
|
27
|
+
console.log(' npx oboelib-cli demo Run live sample calculation');
|
|
28
|
+
console.log(' npx oboelib-cli call <tool> <jsonArgs> Invoke any MCP tool with JSON arguments');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (cmd === 'tools') {
|
|
32
|
+
const out = await rpc('tools/list');
|
|
33
|
+
for (const t of out?.result?.tools || []) {
|
|
34
|
+
console.log('- ' + t.name + ': ' + t.description);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (cmd === 'demo') {
|
|
39
|
+
const out = await rpc('tools/call', { name: "lookup_oboe_fingering", arguments: {"note":"F4"} });
|
|
40
|
+
console.log(out?.result?.content?.[0]?.text || JSON.stringify(out, null, 2));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (cmd === 'call' && arg1) {
|
|
44
|
+
const parsed = arg2 ? JSON.parse(arg2) : {};
|
|
45
|
+
const out = await rpc('tools/call', { name: arg1, arguments: parsed });
|
|
46
|
+
console.log(out?.result?.content?.[0]?.text || JSON.stringify(out, null, 2));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
console.error('Unknown command. Run with --help for usage.');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
main().catch(err => {
|
|
54
|
+
console.error('Error:', err.message);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oboelib-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Official CLI & MCP client for OboeLib (oboelib.com): look up Gillet Conservatoire oboe fingerings, Left/Forked F rules, chromatic trills, and reed scraping diagnostics.",
|
|
5
|
+
"homepage": "https://oboelib.com",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/AbigailDavised/oboelib-mcp.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/AbigailDavised/oboelib-mcp/issues",
|
|
12
|
+
"email": "admin@oboelib.com"
|
|
13
|
+
},
|
|
14
|
+
"funding": {
|
|
15
|
+
"type": "individual",
|
|
16
|
+
"url": "https://oboelib.com"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "OboeLib <admin@oboelib.com> (https://oboelib.com)",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"bin": {
|
|
22
|
+
"oboelib": "./bin/oboelib.mjs",
|
|
23
|
+
"oboelib-cli": "./bin/oboelib.mjs"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"bin/",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"oboe",
|
|
35
|
+
"fingering-chart",
|
|
36
|
+
"conservatoire-system",
|
|
37
|
+
"reed-making",
|
|
38
|
+
"woodwind-pedagogy",
|
|
39
|
+
"mcp",
|
|
40
|
+
"cli"
|
|
41
|
+
]
|
|
42
|
+
}
|