IndexGraph MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@IndexGraph MCP Servershow me the source and callers of function 'handleClick'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
IndexGraph — 前端代码图谱
A local code graph for frontend logic embedded in HTML
<script>blocks.
IndexGraph 是 CodeGraph 的补充——专门吃它吃不下的那块:写在 .html 文件里 <script> 标签内联的前端 JS。100% 本地,不上传任何代码。
✨ 特色
函数级索引 — 提取内联
<script>里的函数声明 / 箭头函数赋值,记录真实行号(映射回原始.html文件,不是提取后的偏移量)调用关系图 — 谁调用了谁,一次查询就有调用者 + 被调用者列表
精确查询 —
indexgraph node <函数名>:已知函数名时,一次拿到源码 + 调用链模糊探索 —
indexgraph explore "<关键词>":不知道确切名字时,按函数名 / 函数体匹配打分排序MCP server — 接入 Claude Code 等 agent,作为
indexgraph_node/indexgraph_explore工具直接调用源码永远现读现取(不是缓存),跟 Read 工具看到的内容逐字节一致
Related MCP server: JS Reverse MCP
🚀 开始使用
# 安装依赖
npm install
# 全局链接 CLI(开发/本地使用)
npm link
# 在目标项目里建索引
cd your-project
indexgraph init
# 查询
indexgraph node renderTable
indexgraph explore "对账单附件怎么渲染的"⌨️ CLI 命令
命令 | 作用 |
| 扫描 |
| 列出已索引文件和符号数量 |
| 精确符号:源码 + 调用者 + 被调用者 |
| 关键词模糊搜索 |
| 打印版本号 |
🔌 接入 MCP(Claude Code 等)
{
"mcpServers": {
"indexgraph": {
"type": "stdio",
"command": "node",
"args": ["D:\\AI\\IndexGraph\\mcp-server.js"]
}
}
}重启 agent 后即可使用 indexgraph_node / indexgraph_explore 两个工具。
⚠️ 已知局限
只解析纯 JS(无
src=属性的内联<script>),不含 TS/JSX调用关系是同文件内的词法匹配,不做真正的作用域解析(动态派发、跨文件 import 追踪不到)
目前一次只处理一层——嵌套函数会被各自记录为独立符号,但父子关系不做特殊标注
🙏 致谢
设计理念上借鉴了 CodeGraph——node/explore 两个命令的分工、MCP 包一层的做法、"源码永远现读、不用缓存"这几个思路都来自它。IndexGraph 是从零实现的(没有读过 CodeGraph 的源码,它是编译发布的闭源分发包),定位是补上它不支持 .html 内联 <script> 的那块空白,不是它的替代品。
构建者:Red
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JiaHuiRed/IndexGraph'
If you have feedback or need assistance with the MCP directory API, please join our Discord server