
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
mcp-thorns
Advanced tools
Perfect one-shot codebase overview: project context, architecture flow, async/error patterns, dead code, internal call graph
Cross-platform codebase analysis using tree-sitter for maximum insight with minimal output.
Analyze current directory:
bunx mcp-thorns
Analyze specific directory:
bunx mcp-thorns /path/to/codebase
bun add -g mcp-thorns
Then use:
thorns /path/to/codebase
import { analyze } from 'mcp-thorns';
// Get ultra-compact analysis as a string
const output = analyze('./path/to/codebase');
console.log(output);
// Or use the raw functions for custom formatting
import { analyzeCodebase, formatUltraCompact } from 'mcp-thorns';
const data = analyzeCodebase('./path/to/codebase');
const formatted = formatUltraCompact(data);
Ultra-compact cheat sheet with maximum information density:
━━━ 47f 8.5kL 44fn 5cls cx:7.9 d:21.7 ━━━
JA 97% 40f 8.3kL 44fn 5c 575i 96e cx:7.9
JS 3% 7f 214L 0fn 0c 0i 0e cx:0
━━━ fn ━━━
7× Ja:main(1)
6× Ja:uuid(1)
5× Ja:createApp(1)
4× Ja:verifyApps(1)
3× Ja:processNextApp(1)
━━━ cls ━━━
2× Ja:StatelessMCPTools
2× Ja:ValidationSystem
━━━ imports ━━━
2× import { CallToolRequestSchema...
1× import WebSocket from 'ws';
━━━ calls ━━━
504× console.log
63× ws.on
51× setTimeout
━━━ ⚠ hotspots ━━━
cx:57 d:19 src/validation-system.js
cx:20 d:28 src/stateless-mcp-tools-basic.js
Legend:
f=files L=lines fn=functions cls=classes i=imports e=exports cx=complexity d=AST-depth (N)=param-countorph=orphaned-files dup=duplicate-code circ=circular-deps in/out=dependency-couplingTOTALS: Total files, lines, functions, classes, avg complexity, avg depth | Issues countsTOP-FUNCTIONS(most-defined): Most common function signatures (count × lang : signature)TOP-CLASSES(most-defined): Most common classesTOP-IMPORTS(common-deps): Most frequent importsTOP-CALLS(frequent-invocations): Most called functions/APIsHOTSPOTS(complex-files): Complexity hotspots - refactor candidates (cx=complexity, d=depth)ORPHANS(unused-or-entries): Files not imported anywhere - potential dead code or entry pointsCOUPLING(central-files): Files with most dependencies - central hubs, refactor candidates (in←imports, out→uses)DUPLICATES(code-clones): AST-based structural clones - consolidation candidates (count × hash : files)CIRCULAR-DEPS(import-cycles): Import cycles - architecture issuesLARGEST-FILES(split-candidates): Largest files - maintainability riskFILE-SIZE-DISTRIBUTION: File size distribution by line countTOP-IDENTIFIERS(common-names): Most used variable names in codebaseAutomatically skips 200+ patterns including:
.git, .svn, .hg, CVSdist, build, out, target, vendornode_modules, __pycache__, .gradle, Pods, etc..cache, .next, .nuxt, .parcel-cache, .vite, .turbo.vscode, .idea, .vs, .sublime-*.pytest_cache, .nyc_output, coverage, htmlcov~/.cache, ~/.config, ~/.local, ~/.npm, ~/.cargo, etc. (when analyzing subdirs)bun.lockb, package-lock.json, yarn.lock, pnpm-lock.yaml.gitignore, .dockerignore, .npmignore, .thornsignoreThorns prioritizes speed by ignoring 96%+ of non-code files.
✅ Linux: Ubuntu, Debian, Alpine, Fedora, Arch ✅ macOS: Intel & Apple Silicon (arm64) ✅ Windows: WSL2, Git Bash, PowerShell ✅ Docker: All Linux images (Alpine, Debian, Ubuntu) ✅ CI/CD: GitHub Actions, GitLab CI, Jenkins, CircleCI ✅ Cloud: AWS Lambda (with Node/Bun layer), GCP Cloud Functions
| Method | Best For | Requirements |
|---|---|---|
| bunx | Quick analysis | bun |
| Bun global | Repeated use | bun |
| Programmatic | Integration | Bun |
FAQs
Perfect one-shot codebase overview: project context, architecture flow, async/error patterns, dead code, internal call graph
The npm package mcp-thorns receives a total of 50 weekly downloads. As such, mcp-thorns popularity was classified as not popular.
We found that mcp-thorns demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.