@triedotdev/mcp 1.0.29 → 1.0.31
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 +66 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,16 @@ claude mcp add Trie --scope user -- npx @triedotdev/mcp
|
|
|
88
88
|
|
|
89
89
|
**Restart Claude Code after adding the MCP server.**
|
|
90
90
|
|
|
91
|
+
### Other MCP-Compatible Tools
|
|
92
|
+
|
|
93
|
+
Trie works with any MCP-compatible AI tool (OpenCode, Windsurf, etc.). Configure your tool to run:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx @triedotdev/mcp
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Trie auto-detects which tool is running and adapts its output format accordingly.
|
|
100
|
+
|
|
91
101
|
---
|
|
92
102
|
|
|
93
103
|
## Usage
|
|
@@ -120,14 +130,11 @@ Trie works in two modes:
|
|
|
120
130
|
|
|
121
131
|
**Enable AI mode:**
|
|
122
132
|
|
|
123
|
-
|
|
124
|
-
# Environment variable
|
|
125
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
133
|
+
**For MCP usage (Cursor/Claude Code):**
|
|
126
134
|
|
|
127
|
-
|
|
128
|
-
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
135
|
+
Add the API key to your MCP configuration:
|
|
129
136
|
|
|
130
|
-
|
|
137
|
+
```json
|
|
131
138
|
{
|
|
132
139
|
"mcpServers": {
|
|
133
140
|
"Trie": {
|
|
@@ -141,8 +148,28 @@ echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
|
141
148
|
}
|
|
142
149
|
```
|
|
143
150
|
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
**For CLI usage (terminal/CI):**
|
|
152
|
+
|
|
153
|
+
Add the API key to your project's `.env.local` file (in your project root):
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Then load it before running CLI commands:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Load environment variables
|
|
163
|
+
set -a; source .env.local; set +a
|
|
164
|
+
|
|
165
|
+
# Now run CLI commands
|
|
166
|
+
trie-agent scan
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
> **Important:**
|
|
170
|
+
> - **MCP config** (`env` in mcp.json) only applies to the MCP server process launched by Cursor/Claude Code
|
|
171
|
+
> - **CLI commands** (`trie-agent scan`, `trie-agent watch`) need the key in your shell environment (via `.env.local` or `export`)
|
|
172
|
+
> - The MCP server and CLI are separate processes with separate environments
|
|
146
173
|
|
|
147
174
|
When AI is enabled, you'll see:
|
|
148
175
|
- `AI-powered analysis enabled` in output
|
|
@@ -153,27 +180,54 @@ When AI is enabled, you'll see:
|
|
|
153
180
|
|
|
154
181
|
## CLI
|
|
155
182
|
|
|
156
|
-
Trie includes a
|
|
183
|
+
Trie includes a CLI for terminal-based scanning and CI/CD integration. The CLI generates reports with actionable issues—it does not auto-fix code. Use Cursor or Claude Code to apply fixes based on the reports.
|
|
184
|
+
|
|
185
|
+
> **Note:** The CLI is separate from MCP tools. Use MCP tools (`trie_scan`, `trie_watch`) when working inside Cursor/Claude Code. Use the CLI (`trie-agent scan`, `trie-agent watch`) for terminal/CI usage.
|
|
157
186
|
|
|
158
187
|
### Commands
|
|
159
188
|
|
|
160
189
|
```bash
|
|
161
|
-
# Basic scan
|
|
190
|
+
# Basic scan (generates report and exits)
|
|
162
191
|
trie-agent scan
|
|
163
192
|
|
|
164
|
-
# Watch for changes
|
|
193
|
+
# Watch for changes (continuously scans and reports)
|
|
165
194
|
trie-agent watch
|
|
166
195
|
|
|
167
196
|
# Scan specific directory
|
|
168
|
-
trie-agent scan --
|
|
197
|
+
trie-agent scan --dir ./src
|
|
169
198
|
|
|
170
199
|
# Scan specific files
|
|
171
200
|
trie-agent scan --files "src/api.ts,src/auth.ts"
|
|
172
201
|
|
|
173
202
|
# Run specific agents
|
|
174
203
|
trie-agent scan --agents security,privacy,bugs
|
|
204
|
+
|
|
205
|
+
# Output JSON report
|
|
206
|
+
trie-agent scan --format json --output report.json
|
|
175
207
|
```
|
|
176
208
|
|
|
209
|
+
### CLI vs MCP Tools
|
|
210
|
+
|
|
211
|
+
| Use Case | Tool | When to Use |
|
|
212
|
+
|----------|------|-------------|
|
|
213
|
+
| **Interactive coding** | MCP tools (`trie_scan`, `trie_watch`) | Working inside Cursor/Claude Code |
|
|
214
|
+
| **Terminal/CI** | CLI (`trie-agent scan`, `trie-agent watch`) | Running from terminal, CI pipelines, scripts |
|
|
215
|
+
| **VS Code** | VS Code extension | Using VS Code (not Cursor/Claude Code) |
|
|
216
|
+
|
|
217
|
+
Both generate the same reports—they're just different interfaces to the same scanning engine.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## How It Works
|
|
222
|
+
|
|
223
|
+
Trie generates **actionable reports** with high-confidence issues. It does not auto-fix code. Instead:
|
|
224
|
+
|
|
225
|
+
1. **Trie scans** your code and generates a report with prioritized issues
|
|
226
|
+
2. **You review** the issues in the report (or share with Cursor/Claude Code)
|
|
227
|
+
3. **You (or Cursor/Claude Code)** apply fixes based on Trie's recommendations
|
|
228
|
+
|
|
229
|
+
This keeps you in control while providing comprehensive issue detection. Trie focuses on **finding and reporting** issues—you decide how to fix them.
|
|
230
|
+
|
|
177
231
|
---
|
|
178
232
|
|
|
179
233
|
## CI/CD Integration
|