Local Development
This page is for contributors or teams running their own Rug Radar instance. If you only want to use Rug Radar in Claude or another MCP client, use the hosted endpoint instead and skip this page.
Repository Layout
src/: MCP server, adapters, tools, utilities, and storage integrationsmigrations/: SQL schemascripts/migrate.mjs: migration runnerapps/docs/: Docusaurus docs and landing siteskill/: prompt/system artifacts
Main Development Commands
From the repo root:
npm run dev
Type-check the server:
npm run typecheck
Build the server:
npm run build
Run docs locally:
npm run dev --prefix apps/docs
Build docs:
npm run build --prefix apps/docs
Runtime Behavior
The server starts an Express app and exposes:
GET /GET /healthGET /info- MCP transport at
/mcp
Tool registration happens in src/index.ts.
Common Local Workflows
Working on token analysis
- edit files in
src/tools/analyzeToken.ts - check scoring changes in
src/utils/riskScore.ts - update docs if score interpretation changes
Working on monitoring
- apply the migration
- make sure
DATABASE_URLis valid - test both
watch_tokenandget_token_changes
Working on docs
- edit files in
apps/docs/docs/ - update
apps/docs/sidebars.tswhen adding pages
Practical Advice
- prefer token addresses over token names when testing resolution logic
- test degraded behavior by omitting optional keys like
BAGS_API_KEY - validate both the server build and the docs build before shipping changes