@triedotdev/mcp 1.0.4 → 1.0.6
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 +112 -207
- package/dist/{chunk-6INDJQPJ.js → chunk-77JFVVWF.js} +207 -37
- package/dist/chunk-77JFVVWF.js.map +1 -0
- package/dist/cli/main.js +17 -9
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +1 -1
- package/dist/index.js +70 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6INDJQPJ.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,51 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Trie
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Customizable Agent Parallelization for AI Code Review**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
13 specialized agents scan your code for security, privacy, compliance, and bugs—all running in parallel. Create custom agents from any document.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **AI coding tool** (Cursor, Claude Code, or VS Code with MCP support)
|
|
7
|
+
## Features
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
- **13 Built-in Agents** - Security, Privacy, SOC 2, Legal, Architecture, DevOps, and more
|
|
10
|
+
- **Parallel Execution** - All agents run simultaneously for fast scans
|
|
11
|
+
- **🔥 YOLO Mode** - Autonomous auto-fixing as you code
|
|
12
|
+
- **Custom Agents** - Create agents from PDFs, docs, or style guides
|
|
13
|
+
- **No API Key Required** - Works with any MCP-compatible AI tool (Cursor, Claude Code, VS Code)
|
|
14
|
+
- **Smart Triaging** - Only activates relevant agents based on code context
|
|
15
|
+
- **Docker Support** - Run in containers for CI/CD or isolated environments
|
|
11
16
|
|
|
12
|
-
|
|
17
|
+
## Quick Start
|
|
13
18
|
|
|
14
19
|
```bash
|
|
15
20
|
npm install -g @triedotdev/mcp
|
|
16
21
|
```
|
|
17
22
|
|
|
18
|
-
###
|
|
23
|
+
### Configure Cursor
|
|
19
24
|
|
|
20
|
-
|
|
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 -- npx @triedotdev/mcp
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Or add to `~/.claude/settings.json`:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"mcpServers": {
|
|
37
|
-
"Trie": {
|
|
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:
|
|
25
|
+
Settings → MCP Servers → Add:
|
|
49
26
|
|
|
50
27
|
```json
|
|
51
28
|
{
|
|
@@ -58,231 +35,159 @@ Or add to `~/.claude/settings.json`:
|
|
|
58
35
|
}
|
|
59
36
|
```
|
|
60
37
|
|
|
61
|
-
###
|
|
62
|
-
|
|
63
|
-
Add to your VS Code settings (`.vscode/settings.json` or user settings):
|
|
38
|
+
### Configure Claude Code
|
|
64
39
|
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
"mcp.servers": {
|
|
68
|
-
"Trie": {
|
|
69
|
-
"command": "npx",
|
|
70
|
-
"args": ["@triedotdev/mcp"]
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
40
|
+
```bash
|
|
41
|
+
claude mcp add Trie -- npx @triedotdev/mcp
|
|
74
42
|
```
|
|
75
43
|
|
|
76
44
|
## Usage
|
|
77
45
|
|
|
78
|
-
|
|
46
|
+
Once configured, just ask your AI assistant:
|
|
79
47
|
|
|
80
|
-
Once configured, use Trie Agent in your AI coding tool:
|
|
81
|
-
|
|
82
|
-
**In Cursor/Claude Code:**
|
|
83
48
|
```
|
|
84
|
-
Scan this code with Trie
|
|
49
|
+
Scan this code with Trie
|
|
85
50
|
```
|
|
86
51
|
|
|
87
|
-
|
|
52
|
+
Or use specific agents:
|
|
53
|
+
|
|
88
54
|
```
|
|
89
|
-
|
|
55
|
+
Run trie_security on this file
|
|
56
|
+
Run trie_soc2 to check compliance
|
|
90
57
|
```
|
|
91
58
|
|
|
92
|
-
|
|
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
|
-
```
|
|
59
|
+
## YOLO Mode 🔥
|
|
112
60
|
|
|
113
|
-
|
|
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_watch`** - Watch mode for continuous scanning
|
|
120
|
-
- **`trie_security`**, **`trie_privacy`**, **`trie_bugs`**, etc. - Run specific agents
|
|
121
|
-
|
|
122
|
-
### Custom Agent Tools
|
|
61
|
+
**Autonomous auto-fixing** - Trie watches your code and automatically fixes high-confidence issues as you code.
|
|
123
62
|
|
|
124
|
-
|
|
125
|
-
- **`trie_save_agent`** - Save agent config after extraction
|
|
126
|
-
- **`trie_list_agents`** - List all registered agents (built-in and custom)
|
|
127
|
-
|
|
128
|
-
## Custom Agents
|
|
129
|
-
|
|
130
|
-
Create specialized code review agents from any document—style guides, compliance docs, framework best practices, etc.
|
|
131
|
-
|
|
132
|
-
### Creating a Custom Agent
|
|
63
|
+
### Via MCP
|
|
133
64
|
|
|
134
65
|
```
|
|
135
|
-
Use
|
|
66
|
+
Use trie_watch with action:"start" yolo:true
|
|
136
67
|
```
|
|
137
68
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
69
|
+
### Via CLI
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
trie-yolo
|
|
141
73
|
```
|
|
142
74
|
|
|
143
|
-
|
|
75
|
+
YOLO mode will:
|
|
76
|
+
- Watch for file changes
|
|
77
|
+
- Scan changed files automatically
|
|
78
|
+
- Auto-fix high-confidence issues (>95% confidence)
|
|
79
|
+
- Log all actions for review
|
|
144
80
|
|
|
145
|
-
|
|
81
|
+
## Docker
|
|
146
82
|
|
|
147
|
-
|
|
148
|
-
Use trie_list_agents
|
|
149
|
-
```
|
|
83
|
+
Run Trie in a container for CI/CD or isolated environments.
|
|
150
84
|
|
|
151
|
-
|
|
85
|
+
```bash
|
|
86
|
+
# Build
|
|
87
|
+
docker build -t trie-agent .
|
|
152
88
|
|
|
153
|
-
|
|
89
|
+
# YOLO mode (auto-fix)
|
|
90
|
+
docker run -v $(pwd):/app trie-agent --yolo
|
|
154
91
|
|
|
155
|
-
|
|
92
|
+
# Watch mode (scan only)
|
|
93
|
+
docker run -v $(pwd):/app trie-agent
|
|
156
94
|
|
|
95
|
+
# CI mode (one-shot scan)
|
|
96
|
+
docker run -v $(pwd):/app trie-agent --once
|
|
157
97
|
```
|
|
158
|
-
Use trie_scan with forceAgents:["react-handbook"]
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Removing a Custom Agent
|
|
162
98
|
|
|
163
|
-
|
|
99
|
+
Or use Docker Compose:
|
|
164
100
|
|
|
165
101
|
```bash
|
|
166
|
-
|
|
167
|
-
|
|
102
|
+
docker-compose up
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
| Mode | Command | Description |
|
|
106
|
+
|------|---------|-------------|
|
|
107
|
+
| YOLO | `--yolo` | Auto-fix high-confidence issues |
|
|
108
|
+
| Watch | (default) | Scan on file changes, no auto-fix |
|
|
109
|
+
| CI | `--once` | One-shot scan, exit with error code if issues found |
|
|
110
|
+
|
|
111
|
+
## Built-in Agents
|
|
112
|
+
|
|
113
|
+
| Agent | Description |
|
|
114
|
+
|-------|-------------|
|
|
115
|
+
| `security` | Vulnerabilities, injection risks, hardcoded secrets |
|
|
116
|
+
| `privacy` | GDPR, CCPA, PII handling, data protection |
|
|
117
|
+
| `soc2` | SOC 2 Type II compliance: access controls, encryption, logging |
|
|
118
|
+
| `legal` | Consent patterns, data retention, compliance |
|
|
119
|
+
| `architecture` | SOLID principles, code organization, scalability |
|
|
120
|
+
| `bugs` | Null safety, edge cases, async issues |
|
|
121
|
+
| `types` | Type errors, missing annotations |
|
|
122
|
+
| `devops` | Config issues, logging, environment variables |
|
|
123
|
+
| `accessibility` | WCAG 2.1, keyboard nav, screen readers |
|
|
124
|
+
| `ux` | User flow testing, error states |
|
|
125
|
+
| `clean` | AI-generated code cleanup |
|
|
126
|
+
| `test` | Test generation and coverage |
|
|
127
|
+
| `comprehension` | Plain-language explanations |
|
|
168
128
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
129
|
+
## Custom Agents
|
|
130
|
+
|
|
131
|
+
Create specialized agents from any document:
|
|
172
132
|
|
|
173
|
-
|
|
133
|
+
```
|
|
134
|
+
Use trie_create_agent with filePath:"./style-guide.pdf" agentName:"my-style"
|
|
135
|
+
```
|
|
174
136
|
|
|
175
|
-
|
|
137
|
+
Custom agents automatically activate during scans based on their rules.
|
|
176
138
|
|
|
177
|
-
|
|
139
|
+
## Available Tools
|
|
178
140
|
|
|
179
|
-
|
|
|
180
|
-
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `trie_scan` | Intelligent scan with automatic agent selection |
|
|
144
|
+
| `trie_fix` | Apply high-confidence fixes |
|
|
145
|
+
| `trie_explain` | Plain-language explanations |
|
|
146
|
+
| `trie_watch` | Continuous scanning mode |
|
|
147
|
+
| `trie_create_agent` | Create custom agent from document |
|
|
148
|
+
| `trie_list_agents` | List all available agents |
|
|
186
149
|
|
|
187
|
-
|
|
150
|
+
Plus individual agent tools: `trie_security`, `trie_privacy`, `trie_soc2`, `trie_bugs`, etc.
|
|
188
151
|
|
|
189
152
|
## Example Output
|
|
190
153
|
|
|
191
154
|
```
|
|
192
|
-
|
|
155
|
+
TRIE AGENT SCAN
|
|
193
156
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
194
157
|
|
|
195
158
|
Smart Triaging:
|
|
196
159
|
✓ Risk Level: high
|
|
197
|
-
✓
|
|
198
|
-
✓
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
Critical Issues Preview:
|
|
209
|
-
1. Password stored without hashing (auth/signup.ts:23)
|
|
210
|
-
Agent: Security | Confidence: 100%
|
|
211
|
-
2. PII stored in plain text (models/user.ts:15)
|
|
212
|
-
Agent: Privacy | Confidence: 95%
|
|
160
|
+
✓ Agents activated: security, soc2, privacy, architecture
|
|
161
|
+
✓ Execution time: 3.2s
|
|
162
|
+
|
|
163
|
+
Results: 72/100
|
|
164
|
+
|
|
165
|
+
🔴 2 Critical Issues
|
|
166
|
+
• Hardcoded API key (CC6.1) - src/api.ts:15
|
|
167
|
+
• SQL injection risk - src/db.ts:42
|
|
168
|
+
|
|
169
|
+
🟡 3 Serious Issues (auto-fixable)
|
|
170
|
+
🔵 2 Moderate Issues
|
|
213
171
|
```
|
|
214
172
|
|
|
215
|
-
## Configuration
|
|
173
|
+
## Configuration
|
|
216
174
|
|
|
217
|
-
Create `.trie/config.json`
|
|
175
|
+
Create `.trie/config.json` to customize:
|
|
218
176
|
|
|
219
177
|
```json
|
|
220
178
|
{
|
|
221
|
-
"version": "1.0",
|
|
222
|
-
"triaging": {
|
|
223
|
-
"enabled": true,
|
|
224
|
-
"riskThresholds": {
|
|
225
|
-
"critical": 70,
|
|
226
|
-
"high": 40,
|
|
227
|
-
"medium": 20
|
|
228
|
-
},
|
|
229
|
-
"autoFixConfidence": 0.95
|
|
230
|
-
},
|
|
231
179
|
"agents": {
|
|
232
180
|
"builtin": {
|
|
233
181
|
"security": { "enabled": true },
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
"design-engineer": { "enabled": true }
|
|
182
|
+
"soc2": { "enabled": true },
|
|
183
|
+
"privacy": { "enabled": true }
|
|
237
184
|
}
|
|
185
|
+
},
|
|
186
|
+
"compliance": {
|
|
187
|
+
"standards": ["GDPR", "CCPA", "SOC2"]
|
|
238
188
|
}
|
|
239
189
|
}
|
|
240
190
|
```
|
|
191
|
+
## License
|
|
241
192
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
### Agent not found
|
|
245
|
-
|
|
246
|
-
**Problem:** Can't find the Trie Agent executable
|
|
247
|
-
|
|
248
|
-
**Solution:** Make sure you have Node.js 18+ installed and try:
|
|
249
|
-
```bash
|
|
250
|
-
npx @triedotdev/mcp --help
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### No agents activating
|
|
254
|
-
|
|
255
|
-
**Problem:** Scan runs but no agents are triggered
|
|
256
|
-
|
|
257
|
-
**Solution:**
|
|
258
|
-
- Check that your code matches patterns (auth, payments, UI, etc.)
|
|
259
|
-
- Review the triaging logic in `.trie/config.json`
|
|
260
|
-
- Try scanning a file with known issues (auth, payments, etc.)
|
|
261
|
-
|
|
262
|
-
### MCP connection fails
|
|
263
|
-
|
|
264
|
-
**Problem:** Can't connect to Trie Agent server
|
|
265
|
-
|
|
266
|
-
**Solution:**
|
|
267
|
-
1. Verify Node.js is installed: `node --version` (should be 18+)
|
|
268
|
-
2. Check the path in MCP config is correct
|
|
269
|
-
3. Restart your AI coding tool
|
|
270
|
-
4. Check console/logs for error messages
|
|
271
|
-
|
|
272
|
-
## Next Steps
|
|
273
|
-
|
|
274
|
-
- **Try different code patterns** - Test with auth, payments, UI components
|
|
275
|
-
- **Explore agents** - See which agents activate for different code types
|
|
276
|
-
- **Use auto-fix** - Let Trie fix high-confidence issues automatically
|
|
277
|
-
- **Generate tests** - Create comprehensive test suites
|
|
278
|
-
- **Add custom agents** - Extend Trie with your own review logic
|
|
279
|
-
|
|
280
|
-
## Support
|
|
281
|
-
|
|
282
|
-
- 📚 **Documentation**: [trie.dev/docs](https://trie.dev/docs)
|
|
283
|
-
- 🐛 **Issues**: [GitHub Issues](https://github.com/Trie-OS/mcp-agent/issues)
|
|
284
|
-
- 💬 **Community**: [Discord](https://discord.gg/trie-ai)
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
**Ready to ship safer code?** Start scanning your AI-generated code now! 🚀
|
|
193
|
+
MIT
|