@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 CHANGED
@@ -1,35 +1,26 @@
1
- # Quick Start Guide
1
+ # Trie
2
2
 
3
- Get Trie Agent up and running in minutes to start scanning and fixing AI-generated code.
3
+ **Customizable Agent Parallelization for AI Code Review**
4
4
 
5
- ## Prerequisites
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
- - **Node.js 18+** installed ([download](https://nodejs.org/))
8
- - **AI coding tool** (Cursor, Claude Code, or VS Code with MCP support)
7
+ ## Features
9
8
 
10
- ## Installation
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
- ### Step 1: Install Trie Agent
15
+ ## Quick Start
13
16
 
14
17
  ```bash
15
18
  npm install -g @triedotdev/mcp
16
19
  ```
17
20
 
18
- ### Step 2: Configure Your AI Tool
21
+ ### Configure Cursor
19
22
 
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 -- 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
- ### For Cursor
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
- ### 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": {
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
- ### 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
- ```
44
+ Once configured, just ask your AI assistant:
86
45
 
87
- **Or use the MCP tool directly:**
88
46
  ```
89
- Use trie_scan to analyze the current file
47
+ Scan this code with Trie
90
48
  ```
91
49
 
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_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
- Use trie_create_agent with filePath:"./react-handbook.pdf" agentName:"react-handbook"
53
+ Run trie_security on this file
54
+ Run trie_soc2 to check compliance
136
55
  ```
137
56
 
138
- Or paste content directly:
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
- Use trie_list_agents
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
- This shows all built-in and custom agents with their pattern counts and categories.
152
-
153
- ### Using a Custom Agent
75
+ ## Custom Agents
154
76
 
155
- Custom agents automatically activate during `trie_scan` based on their activation rules. To force a specific custom agent:
77
+ Create specialized agents from any document:
156
78
 
157
79
  ```
158
- Use trie_scan with forceAgents:["react-handbook"]
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
- The agent will no longer be loaded on subsequent scans.
83
+ Custom agents automatically activate during scans based on their rules.
174
84
 
175
- ## MCP Resources
176
-
177
- Trie also exposes read-only MCP resources for querying agent info, cache stats, and scan reports:
85
+ ## Available Tools
178
86
 
179
- | Resource | Description |
180
- |----------|-------------|
181
- | `trie://agents` | List all available agents |
182
- | `trie://config` | Current configuration |
183
- | `trie://cache/stats` | Cache performance metrics |
184
- | `trie://signatures` | Vulnerability signature counts |
185
- | `trie://reports/{file}` | Access scan reports |
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
- See [MCP_USAGE.md](MCP_USAGE.md) for detailed resource documentation.
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
- 🔍 TRIE AGENT SCAN
101
+ TRIE AGENT SCAN
193
102
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
194
103
 
195
104
  Smart Triaging:
196
105
  ✓ Risk Level: high
197
- Reason: High-risk authentication feature
198
- Agents activated: security, privacy, legal, architecture, typecheck
199
- ✓ Execution time: 8.2s
200
-
201
- Results:
202
- Score: 72/100 (needs work)
203
-
204
- 🔴 2 Critical Issues (require your review)
205
- 🟡 3 Serious Issues (can auto-fix)
206
- 🔵 2 Moderate Issues (can auto-fix)
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 (Optional)
119
+ ## Configuration
216
120
 
217
- Create `.trie/config.json` in your project root to customize behavior:
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
- "privacy": { "enabled": true },
235
- "legal": { "enabled": true },
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
- ## Troubleshooting
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
- - 📚 **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)
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
- **Ready to ship safer code?** Start scanning your AI-generated code now! 🚀
146
+ MIT