@triedotdev/mcp 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/QUICK_START.md +230 -0
- package/README.md +235 -0
- package/dist/chunk-3CS6Z2SL.js +927 -0
- package/dist/chunk-3CS6Z2SL.js.map +1 -0
- package/dist/chunk-6NLHFIYA.js +344 -0
- package/dist/chunk-6NLHFIYA.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +11 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-E7CKHS3R.js +7615 -0
- package/dist/chunk-E7CKHS3R.js.map +1 -0
- package/dist/chunk-EYNAGEQK.js +950 -0
- package/dist/chunk-EYNAGEQK.js.map +1 -0
- package/dist/chunk-MR755QGT.js +927 -0
- package/dist/chunk-MR755QGT.js.map +1 -0
- package/dist/cli/create-agent.d.ts +1 -0
- package/dist/cli/create-agent.js +156 -0
- package/dist/cli/create-agent.js.map +1 -0
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +280 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/yolo-daemon.d.ts +1 -0
- package/dist/cli/yolo-daemon.js +326 -0
- package/dist/cli/yolo-daemon.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3882 -0
- package/dist/index.js.map +1 -0
- package/dist/vibe-code-signatures-4CBHUSI7.js +15 -0
- package/dist/vibe-code-signatures-4CBHUSI7.js.map +1 -0
- package/dist/vulnerability-signatures-J3CUQ7VR.js +17 -0
- package/dist/vulnerability-signatures-J3CUQ7VR.js.map +1 -0
- package/package.json +77 -0
package/QUICK_START.md
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get Trie Agent up and running in minutes to start scanning and fixing AI-generated code.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- **Node.js 18+** installed ([download](https://nodejs.org/))
|
|
8
|
+
- **AI coding tool** (Cursor, Claude Code, or VS Code with MCP support)
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
### Step 1: Install Trie Agent
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g @triedotdev/mcp
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Step 2: Configure Your AI Tool
|
|
19
|
+
|
|
20
|
+
No API key required! Trie uses your AI tool's built-in Claude to do the analysis.
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
|
|
24
|
+
### For Claude Code
|
|
25
|
+
|
|
26
|
+
Use the `claude` CLI to add the MCP server:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude mcp add trie-agent -- node /usr/local/lib/node_modules/@triedotdev/mcp/dist/index.js
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or add to `~/.claude/settings.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"trie-agent": {
|
|
38
|
+
"command": "node",
|
|
39
|
+
"args": ["/usr/local/lib/node_modules/@triedotdev/mcp/dist/index.js"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### For Cursor
|
|
46
|
+
|
|
47
|
+
1. Open Cursor Settings → MCP Servers
|
|
48
|
+
2. Add this configuration:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"trie-agent": {
|
|
54
|
+
"command": "node",
|
|
55
|
+
"args": ["/usr/local/lib/node_modules/@triedotdev/mcp/dist/index.js"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Note:** If installed globally, the path might be different. Find it with:
|
|
62
|
+
```bash
|
|
63
|
+
npm list -g @triedotdev/mcp
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### For VS Code
|
|
67
|
+
|
|
68
|
+
Add to your VS Code settings (`.vscode/settings.json` or user settings):
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcp.servers": {
|
|
73
|
+
"trie-agent": {
|
|
74
|
+
"command": "node",
|
|
75
|
+
"args": ["/usr/local/lib/node_modules/@triedotdev/mcp/dist/index.js"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
### Scan Your Code
|
|
84
|
+
|
|
85
|
+
Once configured, use Trie Agent in your AI coding tool:
|
|
86
|
+
|
|
87
|
+
**In Cursor/Claude Code:**
|
|
88
|
+
```
|
|
89
|
+
Scan this code with Trie Agent
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Or use the MCP tool directly:**
|
|
93
|
+
```
|
|
94
|
+
Use trie_scan to analyze the current file
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Example Workflow
|
|
98
|
+
|
|
99
|
+
1. **Generate code** with your AI assistant
|
|
100
|
+
2. **Scan for issues:**
|
|
101
|
+
```
|
|
102
|
+
Scan this with Trie Agent
|
|
103
|
+
```
|
|
104
|
+
3. **Review results** - Trie will show:
|
|
105
|
+
- Risk level and activated agents
|
|
106
|
+
- Critical issues requiring review
|
|
107
|
+
- Auto-fixable issues
|
|
108
|
+
- Plain-language explanations
|
|
109
|
+
4. **Apply fixes:**
|
|
110
|
+
```
|
|
111
|
+
Auto-fix the high-confidence issues
|
|
112
|
+
```
|
|
113
|
+
5. **Generate tests:**
|
|
114
|
+
```
|
|
115
|
+
Generate tests for this code
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Available Tools
|
|
119
|
+
|
|
120
|
+
- **`trie_scan`** - Scan code with intelligent agent selection
|
|
121
|
+
- **`trie_fix`** - Apply high-confidence fixes automatically
|
|
122
|
+
- **`trie_explain`** - Get plain-language explanations of code/issues
|
|
123
|
+
- **`trie_test`** - Generate tests or check coverage
|
|
124
|
+
- **`trie_commit`** - Create smart commit messages
|
|
125
|
+
- **`trie_register_agent`** - Add custom agents
|
|
126
|
+
|
|
127
|
+
## Example Output
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
🔍 TRIE AGENT SCAN
|
|
131
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
132
|
+
|
|
133
|
+
Smart Triaging:
|
|
134
|
+
✓ Risk Level: high
|
|
135
|
+
✓ Reason: High-risk authentication feature
|
|
136
|
+
✓ Agents activated: security, privacy, legal, architecture, typecheck
|
|
137
|
+
✓ Execution time: 8.2s
|
|
138
|
+
|
|
139
|
+
Results:
|
|
140
|
+
Score: 72/100 (needs work)
|
|
141
|
+
|
|
142
|
+
🔴 2 Critical Issues (require your review)
|
|
143
|
+
🟡 3 Serious Issues (can auto-fix)
|
|
144
|
+
🔵 2 Moderate Issues (can auto-fix)
|
|
145
|
+
|
|
146
|
+
Critical Issues Preview:
|
|
147
|
+
1. Password stored without hashing (auth/signup.ts:23)
|
|
148
|
+
Agent: Security | Confidence: 100%
|
|
149
|
+
2. PII stored in plain text (models/user.ts:15)
|
|
150
|
+
Agent: Privacy | Confidence: 95%
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Configuration (Optional)
|
|
154
|
+
|
|
155
|
+
Create `.trie/config.json` in your project root to customize behavior:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"version": "1.0",
|
|
160
|
+
"triaging": {
|
|
161
|
+
"enabled": true,
|
|
162
|
+
"riskThresholds": {
|
|
163
|
+
"critical": 70,
|
|
164
|
+
"high": 40,
|
|
165
|
+
"medium": 20
|
|
166
|
+
},
|
|
167
|
+
"autoFixConfidence": 0.95
|
|
168
|
+
},
|
|
169
|
+
"agents": {
|
|
170
|
+
"builtin": {
|
|
171
|
+
"security": { "enabled": true },
|
|
172
|
+
"privacy": { "enabled": true },
|
|
173
|
+
"legal": { "enabled": true },
|
|
174
|
+
"design-engineer": { "enabled": true }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Troubleshooting
|
|
181
|
+
|
|
182
|
+
### Agent not found
|
|
183
|
+
|
|
184
|
+
**Problem:** Can't find the Trie Agent executable
|
|
185
|
+
|
|
186
|
+
**Solution:** Find the installation path:
|
|
187
|
+
```bash
|
|
188
|
+
npm list -g @triedotdev/mcp
|
|
189
|
+
# Or
|
|
190
|
+
which trie-agent
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Update your MCP config with the correct path.
|
|
194
|
+
|
|
195
|
+
### No agents activating
|
|
196
|
+
|
|
197
|
+
**Problem:** Scan runs but no agents are triggered
|
|
198
|
+
|
|
199
|
+
**Solution:**
|
|
200
|
+
- Check that your code matches patterns (auth, payments, UI, etc.)
|
|
201
|
+
- Review the triaging logic in `.trie/config.json`
|
|
202
|
+
- Try scanning a file with known issues (auth, payments, etc.)
|
|
203
|
+
|
|
204
|
+
### MCP connection fails
|
|
205
|
+
|
|
206
|
+
**Problem:** Can't connect to Trie Agent server
|
|
207
|
+
|
|
208
|
+
**Solution:**
|
|
209
|
+
1. Verify Node.js is installed: `node --version` (should be 18+)
|
|
210
|
+
2. Check the path in MCP config is correct
|
|
211
|
+
3. Restart your AI coding tool
|
|
212
|
+
4. Check console/logs for error messages
|
|
213
|
+
|
|
214
|
+
## Next Steps
|
|
215
|
+
|
|
216
|
+
- **Try different code patterns** - Test with auth, payments, UI components
|
|
217
|
+
- **Explore agents** - See which agents activate for different code types
|
|
218
|
+
- **Use auto-fix** - Let Trie fix high-confidence issues automatically
|
|
219
|
+
- **Generate tests** - Create comprehensive test suites
|
|
220
|
+
- **Add custom agents** - Extend Trie with your own review logic
|
|
221
|
+
|
|
222
|
+
## Support
|
|
223
|
+
|
|
224
|
+
- 📚 **Documentation**: [trie.dev/docs](https://trie.dev/docs)
|
|
225
|
+
- 🐛 **Issues**: [GitHub Issues](https://github.com/Trie-OS/mcp-agent/issues)
|
|
226
|
+
- 💬 **Community**: [Discord](https://discord.gg/trie-ai)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
**Ready to ship safer code?** Start scanning your AI-generated code now! 🚀
|
package/README.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get Trie Agent up and running in minutes to start scanning and fixing AI-generated code.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- **Node.js 18+** installed ([download](https://nodejs.org/))
|
|
8
|
+
- **AI coding tool** (Cursor, Claude Code, or VS Code with MCP support)
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
### Step 1: Install Trie Agent
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g @triedotdev/mcp
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Step 2: Configure Your AI Tool
|
|
19
|
+
|
|
20
|
+
No API key required! Trie uses your AI tool's built-in Claude to do the analysis.
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
|
|
24
|
+
### For Claude Code
|
|
25
|
+
|
|
26
|
+
Use the `claude` CLI to add the MCP server:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude mcp add trie-agent -- npx @triedotdev/mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or add to `~/.claude/settings.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"trie-agent": {
|
|
38
|
+
"command": "npx",
|
|
39
|
+
"args": ["@triedotdev/mcp"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### For Cursor
|
|
46
|
+
|
|
47
|
+
1. Open Cursor Settings → MCP Servers
|
|
48
|
+
2. Add this configuration:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"trie-agent": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["@triedotdev/mcp"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### For VS Code
|
|
62
|
+
|
|
63
|
+
Add to your VS Code settings (`.vscode/settings.json` or user settings):
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcp.servers": {
|
|
68
|
+
"trie-agent": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["@triedotdev/mcp"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
### Scan Your Code
|
|
79
|
+
|
|
80
|
+
Once configured, use Trie Agent in your AI coding tool:
|
|
81
|
+
|
|
82
|
+
**In Cursor/Claude Code:**
|
|
83
|
+
```
|
|
84
|
+
Scan this code with Trie Agent
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Or use the MCP tool directly:**
|
|
88
|
+
```
|
|
89
|
+
Use trie_scan to analyze the current file
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Example Workflow
|
|
93
|
+
|
|
94
|
+
1. **Generate code** with your AI assistant
|
|
95
|
+
2. **Scan for issues:**
|
|
96
|
+
```
|
|
97
|
+
Scan this with Trie Agent
|
|
98
|
+
```
|
|
99
|
+
3. **Review results** - Trie will show:
|
|
100
|
+
- Risk level and activated agents
|
|
101
|
+
- Critical issues requiring review
|
|
102
|
+
- Auto-fixable issues
|
|
103
|
+
- Plain-language explanations
|
|
104
|
+
4. **Apply fixes:**
|
|
105
|
+
```
|
|
106
|
+
Auto-fix the high-confidence issues
|
|
107
|
+
```
|
|
108
|
+
5. **Generate tests:**
|
|
109
|
+
```
|
|
110
|
+
Generate tests for this code
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Available Tools
|
|
114
|
+
|
|
115
|
+
- **`trie_scan`** - Scan code with intelligent agent selection
|
|
116
|
+
- **`trie_fix`** - Apply high-confidence fixes automatically
|
|
117
|
+
- **`trie_explain`** - Get plain-language explanations of code/issues
|
|
118
|
+
- **`trie_test`** - Generate tests or check coverage
|
|
119
|
+
- **`trie_commit`** - Create smart commit messages
|
|
120
|
+
- **`trie_register_agent`** - Add custom agents
|
|
121
|
+
|
|
122
|
+
## MCP Resources
|
|
123
|
+
|
|
124
|
+
Trie also exposes read-only MCP resources for querying agent info, cache stats, and scan reports:
|
|
125
|
+
|
|
126
|
+
| Resource | Description |
|
|
127
|
+
|----------|-------------|
|
|
128
|
+
| `trie://agents` | List all available agents |
|
|
129
|
+
| `trie://config` | Current configuration |
|
|
130
|
+
| `trie://cache/stats` | Cache performance metrics |
|
|
131
|
+
| `trie://signatures` | Vulnerability signature counts |
|
|
132
|
+
| `trie://reports/{file}` | Access scan reports |
|
|
133
|
+
|
|
134
|
+
See [MCP_USAGE.md](MCP_USAGE.md) for detailed resource documentation.
|
|
135
|
+
|
|
136
|
+
## Example Output
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
🔍 TRIE AGENT SCAN
|
|
140
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
141
|
+
|
|
142
|
+
Smart Triaging:
|
|
143
|
+
✓ Risk Level: high
|
|
144
|
+
✓ Reason: High-risk authentication feature
|
|
145
|
+
✓ Agents activated: security, privacy, legal, architecture, typecheck
|
|
146
|
+
✓ Execution time: 8.2s
|
|
147
|
+
|
|
148
|
+
Results:
|
|
149
|
+
Score: 72/100 (needs work)
|
|
150
|
+
|
|
151
|
+
🔴 2 Critical Issues (require your review)
|
|
152
|
+
🟡 3 Serious Issues (can auto-fix)
|
|
153
|
+
🔵 2 Moderate Issues (can auto-fix)
|
|
154
|
+
|
|
155
|
+
Critical Issues Preview:
|
|
156
|
+
1. Password stored without hashing (auth/signup.ts:23)
|
|
157
|
+
Agent: Security | Confidence: 100%
|
|
158
|
+
2. PII stored in plain text (models/user.ts:15)
|
|
159
|
+
Agent: Privacy | Confidence: 95%
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Configuration (Optional)
|
|
163
|
+
|
|
164
|
+
Create `.trie/config.json` in your project root to customize behavior:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"version": "1.0",
|
|
169
|
+
"triaging": {
|
|
170
|
+
"enabled": true,
|
|
171
|
+
"riskThresholds": {
|
|
172
|
+
"critical": 70,
|
|
173
|
+
"high": 40,
|
|
174
|
+
"medium": 20
|
|
175
|
+
},
|
|
176
|
+
"autoFixConfidence": 0.95
|
|
177
|
+
},
|
|
178
|
+
"agents": {
|
|
179
|
+
"builtin": {
|
|
180
|
+
"security": { "enabled": true },
|
|
181
|
+
"privacy": { "enabled": true },
|
|
182
|
+
"legal": { "enabled": true },
|
|
183
|
+
"design-engineer": { "enabled": true }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Troubleshooting
|
|
190
|
+
|
|
191
|
+
### Agent not found
|
|
192
|
+
|
|
193
|
+
**Problem:** Can't find the Trie Agent executable
|
|
194
|
+
|
|
195
|
+
**Solution:** Make sure you have Node.js 18+ installed and try:
|
|
196
|
+
```bash
|
|
197
|
+
npx @triedotdev/mcp --help
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### No agents activating
|
|
201
|
+
|
|
202
|
+
**Problem:** Scan runs but no agents are triggered
|
|
203
|
+
|
|
204
|
+
**Solution:**
|
|
205
|
+
- Check that your code matches patterns (auth, payments, UI, etc.)
|
|
206
|
+
- Review the triaging logic in `.trie/config.json`
|
|
207
|
+
- Try scanning a file with known issues (auth, payments, etc.)
|
|
208
|
+
|
|
209
|
+
### MCP connection fails
|
|
210
|
+
|
|
211
|
+
**Problem:** Can't connect to Trie Agent server
|
|
212
|
+
|
|
213
|
+
**Solution:**
|
|
214
|
+
1. Verify Node.js is installed: `node --version` (should be 18+)
|
|
215
|
+
2. Check the path in MCP config is correct
|
|
216
|
+
3. Restart your AI coding tool
|
|
217
|
+
4. Check console/logs for error messages
|
|
218
|
+
|
|
219
|
+
## Next Steps
|
|
220
|
+
|
|
221
|
+
- **Try different code patterns** - Test with auth, payments, UI components
|
|
222
|
+
- **Explore agents** - See which agents activate for different code types
|
|
223
|
+
- **Use auto-fix** - Let Trie fix high-confidence issues automatically
|
|
224
|
+
- **Generate tests** - Create comprehensive test suites
|
|
225
|
+
- **Add custom agents** - Extend Trie with your own review logic
|
|
226
|
+
|
|
227
|
+
## Support
|
|
228
|
+
|
|
229
|
+
- 📚 **Documentation**: [trie.dev/docs](https://trie.dev/docs)
|
|
230
|
+
- 🐛 **Issues**: [GitHub Issues](https://github.com/Trie-OS/mcp-agent/issues)
|
|
231
|
+
- 💬 **Community**: [Discord](https://discord.gg/trie-ai)
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
**Ready to ship safer code?** Start scanning your AI-generated code now! 🚀
|