{"_id":"@aravindh-arumugam/chanakya-mcp","_rev":"5-9e9f915a76b89d9f6e93ed208d29c1a0","name":"@aravindh-arumugam/chanakya-mcp","dist-tags":{"latest":"2.1.1"},"versions":{"2.0.0":{"name":"@aravindh-arumugam/chanakya-mcp","version":"2.0.0","keywords":["mcp","model-context-protocol","chanakya","typescript","javascript","tree-sitter","static-analysis","ast","claude-code","cursor"],"license":"MIT","_id":"@aravindh-arumugam/chanakya-mcp@2.0.0","maintainers":[{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"}],"bin":{"chanakya-mcp":"dist/cli/main.js"},"dist":{"shasum":"3321772b536412c5d816b8553207f5eab7f25f6e","tarball":"https://registry.npmjs.org/@aravindh-arumugam/chanakya-mcp/-/chanakya-mcp-2.0.0.tgz","fileCount":9,"integrity":"sha512-jRb9Zy4krEbitoVvGNcUxZUUeiQbKbA6UUzQH4sCFNNNCYUerlMTnVoGZ7xWDPsCDEAnqN1Nx6djQby/ODPKvw==","signatures":[{"sig":"MEUCIQCPHW7k5hlZfp5FZbs1gp/xlp1Etl6LYJhECB50KJzU7gIgaAGpsCELuRy4kPm3Th6istKeOXy0jcOdm8SVvwIDwuc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":304580},"main":"./dist/index.js","pnpm":{"peerDependencyRules":{"allowedVersions":{"tree-sitter-javascript>tree-sitter":"0.25.1","tree-sitter-typescript>tree-sitter":"0.25.1"}},"onlyBuiltDependencies":["esbuild","@vscode/ripgrep"],"ignoredBuiltDependencies":["tree-sitter","tree-sitter-javascript","tree-sitter-typescript"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"744244d69229412dfdf97fc89d3d7020de8c3d11","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","bench":"pnpm run build && node bench/compare.mjs","build":"tsup","check":"pnpm run typecheck && pnpm run lint && pnpm run test","start":"node ./dist/cli/main.js","format":"prettier --write .","docs:dev":"vitepress dev docs","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","docs:build":"vitepress build docs","test:watch":"vitest","bench:sample":"pnpm run build && node bench/sample.mjs","docs:preview":"vitepress preview docs","format:check":"prettier --check .","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"},"_npmVersion":"11.10.0","description":"Chanakya MCP: Local Model Context Protocol server delivering deep structural AST intelligence and 80-93% token reduction for AI coding agents.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^4.4.3","ignore":"^6.0.2","tree-sitter":"0.25.1","better-sqlite3":"^13.0.3","tree-sitter-javascript":"0.25.0","tree-sitter-typescript":"0.23.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.24.0","devDependencies":{"tsup":"^8.3.5","eslint":"^9.17.0","vitest":"^2.1.8","prettier":"^3.4.2","vitepress":"^1.6.4","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","@vscode/ripgrep":"^1.18.0","typescript-eslint":"^8.18.1","@vitest/coverage-v8":"^2.1.8","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/chanakya-mcp_2.0.0_1786221612094_0.2655721593553104","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@aravindh-arumugam/chanakya-mcp","version":"2.0.1","keywords":["mcp","model-context-protocol","chanakya","typescript","javascript","tree-sitter","static-analysis","ast","claude-code","cursor"],"license":"MIT","_id":"@aravindh-arumugam/chanakya-mcp@2.0.1","maintainers":[{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"}],"bin":{"chanakya-mcp":"dist/cli/main.js"},"dist":{"shasum":"7978f76953e70ff3c82079bcd15937243a2e7c92","tarball":"https://registry.npmjs.org/@aravindh-arumugam/chanakya-mcp/-/chanakya-mcp-2.0.1.tgz","fileCount":9,"integrity":"sha512-igS1tKGctCJiSMtywfGCTcbF/uY8QpCtBtn2IBrAsua2NQYjkq/ky0/VJiAIbvQ/nQjjpA62Q01NG2c5OPBW4Q==","signatures":[{"sig":"MEUCICGPDZX+3ONqkvUXbyduYg1D3SGM/krDucCUCBEooBKZAiEA2NqMc+Eq+YZucfYelkF0MuzKX94QHC9oUK0UqtAXA74=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":284910},"main":"./dist/index.js","pnpm":{"peerDependencyRules":{"allowedVersions":{"tree-sitter-javascript>tree-sitter":"0.25.1","tree-sitter-typescript>tree-sitter":"0.25.1"}},"onlyBuiltDependencies":["esbuild","@vscode/ripgrep"],"ignoredBuiltDependencies":["tree-sitter","tree-sitter-javascript","tree-sitter-typescript"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"12587a04983b83d53185b2cb6623c25d14302cf8","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","bench":"pnpm run build && node bench/compare.mjs","build":"tsup","check":"pnpm run typecheck && pnpm run lint && pnpm run test","start":"node ./dist/cli/main.js","format":"prettier --write .","docs:dev":"vitepress dev docs","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","docs:build":"vitepress build docs","test:watch":"vitest","bench:sample":"pnpm run build && node bench/sample.mjs","docs:preview":"vitepress preview docs","format:check":"prettier --check .","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"},"_npmVersion":"11.10.0","description":"Chanakya MCP: Local Model Context Protocol server delivering deep structural AST intelligence and 80-93% token reduction for AI coding agents.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^4.4.3","ignore":"^6.0.2","tree-sitter":"0.25.1","better-sqlite3":"^13.0.3","tree-sitter-javascript":"0.25.0","tree-sitter-typescript":"0.23.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.24.0","devDependencies":{"tsup":"^8.3.5","eslint":"^9.17.0","vitest":"^2.1.8","prettier":"^3.4.2","vitepress":"^1.6.4","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","@vscode/ripgrep":"^1.18.0","typescript-eslint":"^8.18.1","@vitest/coverage-v8":"^2.1.8","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/chanakya-mcp_2.0.1_1786277156685_0.83527863603081","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@aravindh-arumugam/chanakya-mcp","version":"2.0.2","keywords":["mcp","model-context-protocol","chanakya","typescript","javascript","tree-sitter","static-analysis","ast","claude-code","cursor"],"author":{"name":"Aravindh Arumugam"},"license":"MIT","_id":"@aravindh-arumugam/chanakya-mcp@2.0.2","maintainers":[{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"}],"homepage":"https://github.com/aravindh-mb/chanakya-mcp#readme","bugs":{"url":"https://github.com/aravindh-mb/chanakya-mcp/issues"},"bin":{"chanakya-mcp":"dist/cli/main.js"},"dist":{"shasum":"d39786a4252a6cabc72544732d9d76b88f381e06","tarball":"https://registry.npmjs.org/@aravindh-arumugam/chanakya-mcp/-/chanakya-mcp-2.0.2.tgz","fileCount":9,"integrity":"sha512-s+oFuLn62u0cRIGs+ARQgG7JH0TqYNBmpHGE6lLqwa1ZLGoz1mboxXKRFApUfJAgKvpwUqKHX+HZu4Mhka1ZIg==","signatures":[{"sig":"MEUCIQC/y6aB1Z4YqGY/5tbtrq+/z59Rd1JxqzIlz4pK9HMkHgIgWJNx1L2Sg1+5zTFhvOuog/qJF7VHFV2m6OxpWyu5hRU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":285326},"main":"./dist/index.js","pnpm":{"peerDependencyRules":{"allowedVersions":{"tree-sitter-javascript>tree-sitter":"0.25.1","tree-sitter-typescript>tree-sitter":"0.25.1"}},"onlyBuiltDependencies":["esbuild","@vscode/ripgrep"],"ignoredBuiltDependencies":["tree-sitter","tree-sitter-javascript","tree-sitter-typescript"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"0dcd9947a71bf1d739539d684207f12f16e29c5d","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","bench":"pnpm run build && node bench/compare.mjs","build":"tsup","check":"pnpm run typecheck && pnpm run lint && pnpm run test","start":"node ./dist/cli/main.js","format":"prettier --write .","docs:dev":"vitepress dev docs","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","docs:build":"vitepress build docs","test:watch":"vitest","bench:sample":"pnpm run build && node bench/sample.mjs","docs:preview":"vitepress preview docs","format:check":"prettier --check .","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"},"repository":{"url":"git+https://github.com/aravindh-mb/chanakya-mcp.git","type":"git"},"_npmVersion":"11.10.0","description":"Chanakya MCP: Local Model Context Protocol server delivering deep structural AST intelligence and 80-93% token reduction for AI coding agents.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^4.4.3","ignore":"^6.0.2","tree-sitter":"0.25.1","better-sqlite3":"^13.0.3","tree-sitter-javascript":"0.25.0","tree-sitter-typescript":"0.23.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.24.0","devDependencies":{"tsup":"^8.3.5","eslint":"^9.17.0","vitest":"^2.1.8","prettier":"^3.4.2","vitepress":"^1.6.4","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","@vscode/ripgrep":"^1.18.0","typescript-eslint":"^8.18.1","@vitest/coverage-v8":"^2.1.8","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/chanakya-mcp_2.0.2_1786277366401_0.1658953895213322","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@aravindh-arumugam/chanakya-mcp","version":"2.1.0","keywords":["mcp","model-context-protocol","chanakya","typescript","javascript","tree-sitter","static-analysis","ast","claude-code","cursor"],"author":{"name":"Aravindh Arumugam"},"license":"MIT","_id":"@aravindh-arumugam/chanakya-mcp@2.1.0","maintainers":[{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"}],"homepage":"https://chanakyamcp.vercel.app","bugs":{"url":"https://github.com/aravindh-mb/chanakya-mcp/issues"},"bin":{"chanakya-mcp":"dist/cli/main.js"},"dist":{"shasum":"34cb0bd49b0719a0dd0451210a3dd0e88f1ae6c9","tarball":"https://registry.npmjs.org/@aravindh-arumugam/chanakya-mcp/-/chanakya-mcp-2.1.0.tgz","fileCount":12,"integrity":"sha512-DwtULybgLjMtEobBdqP4x9rEOwfFjdNJEBqRwgvFhjlFI6ZcXsTLXLlfJoKWKt9u6cTYEY3GyKbYJXA/r+l4cw==","signatures":[{"sig":"MEUCIQCnhpoacJyHangRnjCHlXcumy0fa7lPh2ppCNBOAi9EvQIgFpEsjCjo6OlFF9aE+BLpNjuui55ZLOlbkYYnSX37LQ0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDBGvgFexerXeWXODhJptg36OdPV9qO06YHCwdLopl+AgIgJtF7YmIAkVB1a5J/GlhDN3rG7jF2F7/Dtxkr9zUzfA4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":318868},"main":"./dist/index.js","pnpm":{"peerDependencyRules":{"allowedVersions":{"tree-sitter-javascript>tree-sitter":"0.25.1","tree-sitter-typescript>tree-sitter":"0.25.1"}},"onlyBuiltDependencies":["esbuild","@vscode/ripgrep"],"ignoredBuiltDependencies":["tree-sitter","tree-sitter-javascript","tree-sitter-typescript"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"8278a6c0f96688d30c7e3a165557b4a2edeb9dc6","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","bench":"pnpm run build && node bench/compare.mjs","build":"tsup","check":"pnpm run typecheck && pnpm run lint && pnpm run test","start":"node ./dist/cli/main.js","format":"prettier --write .","docs:dev":"vitepress dev docs","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","docs:build":"vitepress build docs","test:watch":"vitest","bench:sample":"pnpm run build && node bench/sample.mjs","docs:preview":"vitepress preview docs","format:check":"prettier --check .","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"},"repository":{"url":"git+https://github.com/aravindh-mb/chanakya-mcp.git","type":"git"},"_npmVersion":"11.10.0","description":"Chanakya MCP: Local Model Context Protocol server delivering deep structural AST intelligence and 80-93% token reduction for AI coding agents.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^4.4.3","ignore":"^6.0.2","tree-sitter":"0.25.1","better-sqlite3":"^13.0.3","tree-sitter-javascript":"0.25.0","tree-sitter-typescript":"0.23.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.24.0","readmeFilename":"README.md","devDependencies":{"tsup":"^8.3.5","eslint":"^9.17.0","vitest":"^2.1.8","prettier":"^3.4.2","vitepress":"^1.6.4","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","@vscode/ripgrep":"^1.18.0","typescript-eslint":"^8.18.1","@vitest/coverage-v8":"^2.1.8","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/chanakya-mcp_2.1.0_1791398794033_0.3651227719450725","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"_id":"@aravindh-arumugam/chanakya-mcp@2.1.1","bin":{"chanakya-mcp":"dist/cli/main.js"},"bugs":{"url":"https://github.com/aravindh-mb/chanakya-mcp/issues"},"dist":{"shasum":"63c09b78f8080ae793d7ba180ba34f56a92cdd13","tarball":"https://registry.npmjs.org/@aravindh-arumugam/chanakya-mcp/-/chanakya-mcp-2.1.1.tgz","fileCount":12,"integrity":"sha512-efKqVoRWsecLloojohdhJNmE+A7KntXoFKdf1a5WVSkNGuGiI6KmqlzNrklTORcC7p9CuJwyR02NdKsUsqV5QA==","signatures":[{"sig":"MEUCIQCXHcLfRfrRcxQXXpycDkYumwHaiWySOy1poJe7bBMzGgIgHs5+aM+NoxgQZTy9Z4+ZjvQ1nYaDPL5JgI9FzyjkXII=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBQRzWAVaqOv3NhSZusukM4k3QJw0sD6ihggZ24sH1XqAiEAuVnIUlBLUe2Cp2MixtZa0HIut/Dq8I60O9He9OXagv0="}],"unpackedSize":318954},"main":"./dist/index.js","name":"@aravindh-arumugam/chanakya-mcp","pnpm":{"peerDependencyRules":{"allowedVersions":{"tree-sitter-javascript>tree-sitter":"0.25.1","tree-sitter-typescript>tree-sitter":"0.25.1"}},"onlyBuiltDependencies":["esbuild","@vscode/ripgrep"],"ignoredBuiltDependencies":["tree-sitter","tree-sitter-javascript","tree-sitter-typescript"]},"type":"module","types":"./dist/index.d.ts","author":{"name":"Aravindh Arumugam"},"module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"eb07f995efe56785f72ea62002ec0be7af6f9e05","license":"MIT","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","bench":"pnpm run build && node bench/compare.mjs","build":"tsup","check":"pnpm run typecheck && pnpm run lint && pnpm run test","start":"node ./dist/cli/main.js","format":"prettier --write .","docs:dev":"vitepress dev docs","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","docs:build":"vitepress build docs","test:watch":"vitest","bench:sample":"pnpm run build && node bench/sample.mjs","docs:preview":"vitepress preview docs","format:check":"prettier --check .","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run build"},"version":"2.1.1","_npmUser":{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"},"homepage":"https://chanakyamcp.vercel.app","keywords":["mcp","model-context-protocol","chanakya","typescript","javascript","tree-sitter","static-analysis","ast","claude-code","cursor"],"repository":{"url":"git+https://github.com/aravindh-mb/chanakya-mcp.git","type":"git"},"_npmVersion":"11.10.0","description":"Chanakya MCP: Local Model Context Protocol server delivering deep structural AST intelligence and 80-93% token reduction for AI coding agents.","directories":{},"maintainers":[{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"}],"_nodeVersion":"24.11.1","dependencies":{"zod":"^4.4.3","ignore":"^6.0.2","tree-sitter":"0.25.1","better-sqlite3":"^13.0.3","tree-sitter-javascript":"0.25.0","tree-sitter-typescript":"0.23.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.24.0","devDependencies":{"tsup":"^8.3.5","eslint":"^9.17.0","vitest":"^2.1.8","prettier":"^3.4.2","vitepress":"^1.6.4","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","@vscode/ripgrep":"^1.18.0","typescript-eslint":"^8.18.1","@vitest/coverage-v8":"^2.1.8","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chanakya-mcp_2.1.1_1791398922820_0.5196199054285591"}}},"time":{"created":"2026-08-08T20:40:11.949Z","modified":"2026-10-07T18:48:43.106Z","2.0.0":"2026-08-08T20:40:12.256Z","2.0.1":"2026-08-09T12:05:56.835Z","2.0.2":"2026-08-09T12:09:26.575Z","2.1.0":"2026-10-07T18:46:34.230Z","2.1.1":"2026-10-07T18:48:42.964Z"},"bugs":{"url":"https://github.com/aravindh-mb/chanakya-mcp/issues"},"author":{"name":"Aravindh Arumugam"},"license":"MIT","homepage":"https://chanakyamcp.vercel.app","keywords":["mcp","model-context-protocol","chanakya","typescript","javascript","tree-sitter","static-analysis","ast","claude-code","cursor"],"repository":{"url":"git+https://github.com/aravindh-mb/chanakya-mcp.git","type":"git"},"description":"Chanakya MCP: Local Model Context Protocol server delivering deep structural AST intelligence and 80-93% token reduction for AI coding agents.","maintainers":[{"name":"aravindh-arumugam","email":"aaravindh23cse@gmail.com"}],"readme":"<div align=\"center\">\n\n<img src=\"https://chanakyamcp.vercel.app/logo.svg\" alt=\"Chanakya MCP logo\" width=\"96\" height=\"96\">\n\n# Chanakya MCP\n\n**Give your AI coding agent a map of your codebase.**\n\nA local MCP server that indexes JavaScript and TypeScript projects, so Claude, Cursor, Gemini and other agents can find definitions, callers and dependencies in one call instead of grepping and reading whole files.\n\n[![npm version](https://img.shields.io/npm/v/@aravindh-arumugam/chanakya-mcp?color=38bdf8&style=flat-square)](https://www.npmjs.com/package/@aravindh-arumugam/chanakya-mcp)\n[![License: MIT](https://img.shields.io/badge/license-MIT-10b981?style=flat-square)](https://unpkg.com/@aravindh-arumugam/chanakya-mcp/LICENSE)\n[![100% local](https://img.shields.io/badge/runs-100%25%20local-10b981?style=flat-square)](#private-by-design)\n[![Node](https://img.shields.io/badge/node-%3E%3D18.18-38bdf8?style=flat-square)](#requirements)\n\n[Quick start](#quick-start) · [Connect your agent](#connect-your-agent) · [Tools](#tools) · [Benchmarks](#benchmarks) · [Docs](https://chanakyamcp.vercel.app)\n\n</div>\n\n---\n\n## What it does\n\nWhen an agent needs to know _\"who calls `validateUser`?\"_, it usually greps, opens a dozen files, and reads them into its context. Chanakya parses your code once with [tree-sitter](https://tree-sitter.github.io/), stores the structure in a local SQLite index, and answers that question directly:\n\n```text\nWithout Chanakya (example)               With Chanakya\n────────────────────────────────         ────────────────────────────────\ngrep \"validateUser\"    → 40 matches      get_callers(validateUser)\nread routes/user.ts    → 900 tokens        → routes/user.ts:19  registerUserRoutes\nread services/user.ts  → 1,100 tokens      → jobs/import.ts:42  importUsers\nread jobs/import.ts    → 700 tokens\n…sift by hand                            one call, a few dozen tokens\n```\n\n## Why use it\n\n- 🎯 **Fewer tokens.** 56–90% less context than grep + file reads in our benchmarks, and the bigger the repo, the bigger the saving.\n- ⚡ **Fast.** Most lookups take under 15 ms, even on a 14,000-file repository.\n- 🧠 **Structure, not text.** Real definitions, call graphs, references and import graphs from the syntax tree, not fuzzy string matches.\n- 🔒 **Private.** Runs entirely on your machine. No API keys, no network calls, no source code leaves your computer.\n- ♻️ **Always current.** Incremental reindexing only reparses files that changed; `--watch` keeps it live as you edit.\n\n## Quick start\n\n```bash\nnpx -y @aravindh-arumugam/chanakya-mcp /path/to/your/project\n```\n\nThe first run builds the index (seconds for most projects, a few minutes for very large monorepos); later runs only process changed files. The index lives in `.code-intelligence/` inside your project and ignores itself in git.\n\n## Connect your agent\n\n**Claude Code**\n\n```bash\nclaude mcp add chanakya -- npx -y @aravindh-arumugam/chanakya-mcp /path/to/your/project\n```\n\n**Cursor** (`.cursor/mcp.json`), **Windsurf** (`~/.codeium/windsurf/mcp_config.json`), **Gemini CLI** (`~/.gemini/settings.json`), **Cline / Roo Code** (MCP settings): all use the same block.\n\n```json\n{\n  \"mcpServers\": {\n    \"chanakya\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aravindh-arumugam/chanakya-mcp\", \"/path/to/your/project\"]\n    }\n  }\n}\n```\n\nIn Cursor you can use `\"${workspaceFolder}\"` as the path.\n\n> **Tip for very large repos:** run the command once in a terminal before connecting your agent, so the first index is already built when the agent starts.\n\n## Tools\n\n**Find and understand**\n\n| Tool                                  | Answers                                                                                  |\n| :------------------------------------ | :--------------------------------------------------------------------------------------- |\n| `search_symbols`                      | Where is this function, class, type or variable? (exact, prefix or substring)            |\n| `get_symbol_context`                  | Everything about a symbol in one call: definition, parents, callers, callees, references |\n| `find_definition`                     | Exact file and line of a symbol                                                          |\n| `find_references`                     | Every place a symbol is used                                                             |\n| `get_callers` / `get_callees`         | Who calls this, and what does it call?                                                   |\n| `get_dependencies` / `get_dependents` | What does this file import, and what imports it?                                         |\n| `get_file_structure`                  | Outline of a file: classes, methods, functions                                           |\n| `get_symbol`                          | Kind, location, signature and export status of a symbol                                  |\n| `search_code`                         | Text or regex search, with the enclosing function for every match                        |\n\n**Edit safely**\n\n| Tool             | Does                                                             |\n| :--------------- | :--------------------------------------------------------------- |\n| `rename_symbol`  | Renames a symbol and its resolved references across files        |\n| `replace_symbol` | Replaces a whole declaration by its indexed position             |\n| `apply_patch`    | Exact find-and-replace edits; refuses ambiguous or stale matches |\n\nEdits stay inside the project folder and are rejected if the file changed since it was indexed.\n\n## Benchmarks\n\nMeasured on Windows 11, Node 24, against the [VS Code](https://github.com/microsoft/vscode) repository (14,432 files) and two smaller projects.\n\n|                                       | Result                          |\n| :------------------------------------ | :------------------------------ |\n| First index, 14,432 files             | **3.6 min** (21.3 min in 2.0.x) |\n| Reindex after editing one file        | **6.4 s**                       |\n| Find a definition                     | **~1–12 ms**                    |\n| Tokens vs grep + reads, 16-file app   | **56% fewer**                   |\n| Tokens vs grep + reads, 126-file repo | **90% fewer**                   |\n\nNumbers come from the benchmark scripts in the source repository (`pnpm run bench`, `pnpm run bench:sample`). Changes behind them are listed in the [changelog](https://unpkg.com/@aravindh-arumugam/chanakya-mcp/CHANGELOG.md).\n\n## Options\n\n```bash\nchanakya-mcp [project-path] [options]\n```\n\n| Option                         | Description                                             |\n| :----------------------------- | :------------------------------------------------------ |\n| `[project-path]`               | Project to index. Defaults to the current directory.    |\n| `-w, --watch`                  | Keep running and reindex files as they change.          |\n| `--force`                      | Reindex every file, ignoring the change check.          |\n| `--log-level <level>`          | `silent`, `error`, `warn`, `info` (default) or `debug`. |\n| `--verbose` / `--quiet`        | Shorthand for `debug` / `error` logging.                |\n| `-h, --help` / `-v, --version` | Show help or version.                                   |\n\nLogs go to stderr; stdout carries only MCP protocol messages.\n\n## Private by design\n\n- Everything runs locally: no network calls, no telemetry, no API keys.\n- File access is confined to the project folder, including through symlinks.\n- User regexes run in a worker thread with a time limit, so a bad pattern can't hang the server.\n- All SQL is parameterized.\n\nSee [SECURITY.md](https://unpkg.com/@aravindh-arumugam/chanakya-mcp/SECURITY.md) for the full threat model.\n\n## Requirements\n\n- Node.js 18.18 or newer\n- JavaScript or TypeScript projects (`.js`, `.jsx`, `.mjs`, `.cjs`, `.ts`, `.tsx`, `.mts`, `.cts`)\n\n## Links\n\n[Documentation](https://chanakyamcp.vercel.app) · [Changelog](https://unpkg.com/@aravindh-arumugam/chanakya-mcp/CHANGELOG.md) · [MIT License](https://unpkg.com/@aravindh-arumugam/chanakya-mcp/LICENSE) © Aravindh Arumugam\n","readmeFilename":"README.md"}