@triedotdev/mcp 1.0.4 → 1.0.5
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 +75 -217
- 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,35 +1,26 @@
|
|
|
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
|
+
- **Custom Agents** - Create agents from PDFs, docs, or style guides
|
|
12
|
+
- **No API Key Required** - Uses your AI tool's built-in Claude
|
|
13
|
+
- **Smart Triaging** - Only activates relevant agents based on code context
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
## Quick Start
|
|
13
16
|
|
|
14
17
|
```bash
|
|
15
18
|
npm install -g @triedotdev/mcp
|
|
16
19
|
```
|
|
17
20
|
|
|
18
|
-
###
|
|
21
|
+
### Configure Cursor
|
|
19
22
|
|
|
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`:
|
|
23
|
+
Settings → MCP Servers → Add:
|
|
33
24
|
|
|
34
25
|
```json
|
|
35
26
|
{
|
|
@@ -42,247 +33,114 @@ Or add to `~/.claude/settings.json`:
|
|
|
42
33
|
}
|
|
43
34
|
```
|
|
44
35
|
|
|
45
|
-
###
|
|
46
|
-
|
|
47
|
-
1. Open Cursor Settings → MCP Servers
|
|
48
|
-
2. Add this configuration:
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"mcpServers": {
|
|
53
|
-
"Trie": {
|
|
54
|
-
"command": "npx",
|
|
55
|
-
"args": ["@triedotdev/mcp"]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
```
|
|
36
|
+
### Configure Claude Code
|
|
60
37
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Add to your VS Code settings (`.vscode/settings.json` or user settings):
|
|
64
|
-
|
|
65
|
-
```json
|
|
66
|
-
{
|
|
67
|
-
"mcp.servers": {
|
|
68
|
-
"Trie": {
|
|
69
|
-
"command": "npx",
|
|
70
|
-
"args": ["@triedotdev/mcp"]
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
38
|
+
```bash
|
|
39
|
+
claude mcp add Trie -- npx @triedotdev/mcp
|
|
74
40
|
```
|
|
75
41
|
|
|
76
42
|
## Usage
|
|
77
43
|
|
|
78
|
-
|
|
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
|
-
```
|
|
44
|
+
Once configured, just ask your AI assistant:
|
|
86
45
|
|
|
87
|
-
**Or use the MCP tool directly:**
|
|
88
46
|
```
|
|
89
|
-
|
|
47
|
+
Scan this code with Trie
|
|
90
48
|
```
|
|
91
49
|
|
|
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
|
-
```
|
|
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_watch`** - Watch mode for continuous scanning
|
|
120
|
-
- **`trie_security`**, **`trie_privacy`**, **`trie_bugs`**, etc. - Run specific agents
|
|
121
|
-
|
|
122
|
-
### Custom Agent Tools
|
|
123
|
-
|
|
124
|
-
- **`trie_create_agent`** - Create a custom agent from a document (PDF, TXT, MD)
|
|
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
|
|
50
|
+
Or use specific agents:
|
|
133
51
|
|
|
134
52
|
```
|
|
135
|
-
|
|
53
|
+
Run trie_security on this file
|
|
54
|
+
Run trie_soc2 to check compliance
|
|
136
55
|
```
|
|
137
56
|
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
Use trie_create_agent with agentName:"my-style-guide" documentContent:"[paste your style guide here]"
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
The tool will parse the document and prompt you to extract knowledge. Then use `trie_save_agent` to save it.
|
|
144
|
-
|
|
145
|
-
### Listing Custom Agents
|
|
57
|
+
## Built-in Agents
|
|
146
58
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
59
|
+
| Agent | Description |
|
|
60
|
+
|-------|-------------|
|
|
61
|
+
| `security` | Vulnerabilities, injection risks, hardcoded secrets |
|
|
62
|
+
| `privacy` | GDPR, CCPA, PII handling, data protection |
|
|
63
|
+
| `soc2` | SOC 2 Type II compliance: access controls, encryption, logging |
|
|
64
|
+
| `legal` | Consent patterns, data retention, compliance |
|
|
65
|
+
| `architecture` | SOLID principles, code organization, scalability |
|
|
66
|
+
| `bugs` | Null safety, edge cases, async issues |
|
|
67
|
+
| `types` | Type errors, missing annotations |
|
|
68
|
+
| `devops` | Config issues, logging, environment variables |
|
|
69
|
+
| `accessibility` | WCAG 2.1, keyboard nav, screen readers |
|
|
70
|
+
| `ux` | User flow testing, error states |
|
|
71
|
+
| `clean` | AI-generated code cleanup |
|
|
72
|
+
| `test` | Test generation and coverage |
|
|
73
|
+
| `comprehension` | Plain-language explanations |
|
|
150
74
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### Using a Custom Agent
|
|
75
|
+
## Custom Agents
|
|
154
76
|
|
|
155
|
-
|
|
77
|
+
Create specialized agents from any document:
|
|
156
78
|
|
|
157
79
|
```
|
|
158
|
-
Use
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Removing a Custom Agent
|
|
162
|
-
|
|
163
|
-
Custom agents are stored as JSON files in your project's `.trie/agents/` directory. To remove one:
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
# List custom agents
|
|
167
|
-
ls .trie/agents/
|
|
168
|
-
|
|
169
|
-
# Remove a specific agent
|
|
170
|
-
rm .trie/agents/react-handbook.json
|
|
80
|
+
Use trie_create_agent with filePath:"./style-guide.pdf" agentName:"my-style"
|
|
171
81
|
```
|
|
172
82
|
|
|
173
|
-
|
|
83
|
+
Custom agents automatically activate during scans based on their rules.
|
|
174
84
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
Trie also exposes read-only MCP resources for querying agent info, cache stats, and scan reports:
|
|
85
|
+
## Available Tools
|
|
178
86
|
|
|
179
|
-
|
|
|
180
|
-
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
87
|
+
| Tool | Description |
|
|
88
|
+
|------|-------------|
|
|
89
|
+
| `trie_scan` | Intelligent scan with automatic agent selection |
|
|
90
|
+
| `trie_fix` | Apply high-confidence fixes |
|
|
91
|
+
| `trie_explain` | Plain-language explanations |
|
|
92
|
+
| `trie_watch` | Continuous scanning mode |
|
|
93
|
+
| `trie_create_agent` | Create custom agent from document |
|
|
94
|
+
| `trie_list_agents` | List all available agents |
|
|
186
95
|
|
|
187
|
-
|
|
96
|
+
Plus individual agent tools: `trie_security`, `trie_privacy`, `trie_soc2`, `trie_bugs`, etc.
|
|
188
97
|
|
|
189
98
|
## Example Output
|
|
190
99
|
|
|
191
100
|
```
|
|
192
|
-
|
|
101
|
+
TRIE AGENT SCAN
|
|
193
102
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
194
103
|
|
|
195
104
|
Smart Triaging:
|
|
196
105
|
✓ 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%
|
|
106
|
+
✓ Agents activated: security, soc2, privacy, architecture
|
|
107
|
+
✓ Execution time: 3.2s
|
|
108
|
+
|
|
109
|
+
Results: 72/100
|
|
110
|
+
|
|
111
|
+
🔴 2 Critical Issues
|
|
112
|
+
• Hardcoded API key (CC6.1) - src/api.ts:15
|
|
113
|
+
• SQL injection risk - src/db.ts:42
|
|
114
|
+
|
|
115
|
+
🟡 3 Serious Issues (auto-fixable)
|
|
116
|
+
🔵 2 Moderate Issues
|
|
213
117
|
```
|
|
214
118
|
|
|
215
|
-
## Configuration
|
|
119
|
+
## Configuration
|
|
216
120
|
|
|
217
|
-
Create `.trie/config.json`
|
|
121
|
+
Create `.trie/config.json` to customize:
|
|
218
122
|
|
|
219
123
|
```json
|
|
220
124
|
{
|
|
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
125
|
"agents": {
|
|
232
126
|
"builtin": {
|
|
233
127
|
"security": { "enabled": true },
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
"design-engineer": { "enabled": true }
|
|
128
|
+
"soc2": { "enabled": true },
|
|
129
|
+
"privacy": { "enabled": true }
|
|
237
130
|
}
|
|
131
|
+
},
|
|
132
|
+
"compliance": {
|
|
133
|
+
"standards": ["GDPR", "CCPA", "SOC2"]
|
|
238
134
|
}
|
|
239
135
|
}
|
|
240
136
|
```
|
|
241
137
|
|
|
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
|
|
138
|
+
## Links
|
|
281
139
|
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
140
|
+
- [Documentation](https://trie.dev/docs)
|
|
141
|
+
- [GitHub](https://github.com/Trie-OS/mcp-agent)
|
|
142
|
+
- [Discord](https://discord.gg/trie-ai)
|
|
285
143
|
|
|
286
|
-
|
|
144
|
+
## License
|
|
287
145
|
|
|
288
|
-
|
|
146
|
+
MIT
|