taru-mcp 0.1.2 → 0.1.4
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 +8 -33
- package/package.json +3 -2
- package/setup.sh +120 -0
package/README.md
CHANGED
|
@@ -4,45 +4,20 @@ MCP server for [taru](https://taru.arupa.io) — connect Claude Code or Codex to
|
|
|
4
4
|
|
|
5
5
|
Zero dependencies. Pure Node.js. Works with any MCP client.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
### Claude Code
|
|
7
|
+
## Quick Setup
|
|
10
8
|
|
|
11
9
|
```bash
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# Copy the agent instructions to your project
|
|
15
|
-
cp node_modules/taru-mcp/samples/CLAUDE.md ./CLAUDE.md
|
|
10
|
+
curl -fsSL https://raw.githubusercontent.com/arupa-inc/taru-mcp/main/setup.sh | bash
|
|
16
11
|
```
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
# Copy the agent instructions to your project
|
|
24
|
-
cp node_modules/taru-mcp/samples/AGENTS.md ./AGENTS.md
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Agent instructions
|
|
28
|
-
|
|
29
|
-
The `samples/` directory contains ready-to-use instruction files:
|
|
30
|
-
|
|
31
|
-
| File | For | Description |
|
|
32
|
-
|------|-----|-------------|
|
|
33
|
-
| `samples/CLAUDE.md` | Claude Code | Drop into your project root |
|
|
34
|
-
| `samples/AGENTS.md` | Codex | Drop into your project root |
|
|
35
|
-
|
|
36
|
-
These files teach the AI how to use taru tools, classify documents vs opinions, handle conflicts, and set confidence scores. **Copy the appropriate file to your project root** after installing.
|
|
37
|
-
|
|
38
|
-
## Options
|
|
13
|
+
The script will ask you:
|
|
14
|
+
1. **Project folder name** — creates the workspace directory
|
|
15
|
+
2. **AI client** — Claude Code, Codex, or both
|
|
16
|
+
3. **API token** — optional, can add later
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
|------|-----|---------|-------------|
|
|
42
|
-
| `--workspace-id`, `-w` | `TARU_WORKSPACE_ID` | `00000000-...0001` | Workspace UUID |
|
|
43
|
-
| `--token`, `-t` | `TARU_API_TOKEN` | — | API token (`xxv_...`) |
|
|
18
|
+
It handles `npm init`, `taru-mcp` installation, agent file (`CLAUDE.md` / `AGENTS.md`) setup, and MCP registration automatically.
|
|
44
19
|
|
|
45
|
-
Get your API token from the taru web console: **
|
|
20
|
+
Get your API token from the taru web console: **Settings > API Key**.
|
|
46
21
|
|
|
47
22
|
## Tools
|
|
48
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taru-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "MCP server for taru knowledge graph — connect Claude Code or Codex to your team's shared brain",
|
|
5
5
|
"bin": {
|
|
6
6
|
"taru-mcp": "./bin/taru-mcp.mjs"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
11
11
|
"samples/",
|
|
12
|
+
"setup.sh",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
14
15
|
"keywords": [
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
],
|
|
22
23
|
"repository": {
|
|
23
24
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/arupa-inc/taru-mcp"
|
|
25
26
|
},
|
|
26
27
|
"license": "MIT",
|
|
27
28
|
"engines": {
|
package/setup.sh
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# taru MCP setup script
|
|
5
|
+
# Usage:
|
|
6
|
+
# curl -fsSL https://raw.githubusercontent.com/arupa-inc/taru-mcp/main/setup.sh | bash
|
|
7
|
+
|
|
8
|
+
URL="https://taru-api.arupa.io"
|
|
9
|
+
|
|
10
|
+
echo ""
|
|
11
|
+
echo " 🌳 taru MCP Setup"
|
|
12
|
+
echo ""
|
|
13
|
+
|
|
14
|
+
# 1. Ask project folder name
|
|
15
|
+
read -rp "Project folder name: " FOLDER
|
|
16
|
+
if [ -z "$FOLDER" ]; then
|
|
17
|
+
echo "Error: folder name is required"
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [ -d "$FOLDER" ]; then
|
|
22
|
+
echo "==> Directory '$FOLDER' already exists, using it."
|
|
23
|
+
else
|
|
24
|
+
mkdir -p "$FOLDER"
|
|
25
|
+
echo "==> Created '$FOLDER'"
|
|
26
|
+
fi
|
|
27
|
+
cd "$FOLDER"
|
|
28
|
+
|
|
29
|
+
# 2. Ask client type
|
|
30
|
+
echo ""
|
|
31
|
+
echo "Which AI client do you use?"
|
|
32
|
+
echo " 1) Claude Code"
|
|
33
|
+
echo " 2) Codex"
|
|
34
|
+
echo " 3) Not sure (copies both CLAUDE.md and AGENTS.md)"
|
|
35
|
+
echo ""
|
|
36
|
+
read -rp "Choose [1/2/3]: " CLIENT_CHOICE
|
|
37
|
+
|
|
38
|
+
case "$CLIENT_CHOICE" in
|
|
39
|
+
1) CLIENT="claude" ;;
|
|
40
|
+
2) CLIENT="codex" ;;
|
|
41
|
+
*) CLIENT="both" ;;
|
|
42
|
+
esac
|
|
43
|
+
|
|
44
|
+
# 3. Ask token (skippable)
|
|
45
|
+
echo ""
|
|
46
|
+
read -rp "API token (press Enter to skip): " TOKEN
|
|
47
|
+
|
|
48
|
+
# Check npm
|
|
49
|
+
if ! command -v npm &>/dev/null; then
|
|
50
|
+
echo "Error: 'npm' not found. Install Node.js first."
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# Init & install
|
|
55
|
+
if [ ! -f "package.json" ]; then
|
|
56
|
+
echo "==> Initializing package.json..."
|
|
57
|
+
npm init -y --silent > /dev/null 2>&1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo "==> Installing taru-mcp..."
|
|
61
|
+
npm install taru-mcp --silent
|
|
62
|
+
|
|
63
|
+
# Copy agent files
|
|
64
|
+
copy_agent_file() {
|
|
65
|
+
local file="$1"
|
|
66
|
+
if [ -f "$file" ]; then
|
|
67
|
+
echo "==> $file already exists, appending taru instructions..."
|
|
68
|
+
echo "" >> "$file"
|
|
69
|
+
cat "node_modules/taru-mcp/samples/$file" >> "$file"
|
|
70
|
+
else
|
|
71
|
+
cp "node_modules/taru-mcp/samples/$file" "./$file"
|
|
72
|
+
echo "==> Created $file"
|
|
73
|
+
fi
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if [ "$CLIENT" = "claude" ]; then
|
|
77
|
+
copy_agent_file "CLAUDE.md"
|
|
78
|
+
elif [ "$CLIENT" = "codex" ]; then
|
|
79
|
+
copy_agent_file "AGENTS.md"
|
|
80
|
+
else
|
|
81
|
+
copy_agent_file "CLAUDE.md"
|
|
82
|
+
copy_agent_file "AGENTS.md"
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Register MCP server
|
|
86
|
+
register_mcp() {
|
|
87
|
+
local cli="$1"
|
|
88
|
+
local token_args=""
|
|
89
|
+
if [ -n "$TOKEN" ]; then
|
|
90
|
+
token_args=" --token $TOKEN"
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
if command -v "$cli" &>/dev/null; then
|
|
94
|
+
echo "==> Registering MCP server with $cli..."
|
|
95
|
+
$cli mcp add taru -- npx taru-mcp --url "$URL"$token_args
|
|
96
|
+
else
|
|
97
|
+
echo "==> '$cli' not found, skipping MCP registration."
|
|
98
|
+
echo " Run this later: $cli mcp add taru -- npx taru-mcp --url $URL$token_args"
|
|
99
|
+
fi
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if [ "$CLIENT" = "claude" ]; then
|
|
103
|
+
register_mcp "claude"
|
|
104
|
+
elif [ "$CLIENT" = "codex" ]; then
|
|
105
|
+
register_mcp "codex"
|
|
106
|
+
else
|
|
107
|
+
register_mcp "claude"
|
|
108
|
+
register_mcp "codex"
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
echo ""
|
|
112
|
+
echo " ✅ Setup complete!"
|
|
113
|
+
echo ""
|
|
114
|
+
echo " Project: $(pwd)"
|
|
115
|
+
[ "$CLIENT" = "claude" ] || [ "$CLIENT" = "both" ] && echo " Agent file: ./CLAUDE.md"
|
|
116
|
+
[ "$CLIENT" = "codex" ] || [ "$CLIENT" = "both" ] && echo " Agent file: ./AGENTS.md"
|
|
117
|
+
[ -n "$TOKEN" ] && echo " Token: configured" || echo " Token: skipped (add later via settings)"
|
|
118
|
+
echo ""
|
|
119
|
+
echo " Open this folder in your AI client to start growing the tree."
|
|
120
|
+
echo ""
|