@埃里克塞维尔/nojs mcp
MCP(模型上下文协议)服务器,为AI助手提供对 编号JS 框架——HTML第一反应式框架。
这是什么?
此MCP服务器为AI助手(GitHub Copilot、Claude、Cursor等)提供结构化访问:
- 80+指令 带有语法、示例和使用说明
- 主管管理层指令 (
title,meta,link,script,base)用于声明性 `` 控制 - 插件系统 具有生命周期挂钩、自定义指令和共享状态
- 32个内置过滤器 (文本、数字、数组、日期、实用程序)
- API完全公开 参考(配置、初始化、路由器、i18n、存储、插件等)
- 23页文档 (开始、路由、表单、拖放等)
- 模板验证 用于捕获NoJS语法错误的工具
- 构件脚手架 用于常见的UI模式
安装
VS代码/光标
添加到MCP配置(.vscode/mcp.json 或设置):
{
"mcpServers": {
"nojs": {
"command": "npx",
"args": ["-y", "@erickxavier/nojs-mcp"]
}
}
}克劳德桌面
添加 claude_desktop_config.json:
{
"mcpServers": {
"nojs": {
"command": "npx",
"args": ["-y", "@erickxavier/nojs-mcp"]
}
}
}资源
| URI | 描述 |
|---|---|
nojs://ref/directives | 所有带有语法和示例的指令 |
nojs://ref/api | 完整的公共API参考 |
nojs://ref/filters | 全部32个内置过滤器 |
nojs://docs/{topic} | 文档页面(入门、路线、表单验证等) |
工具
validate_template
验证NoJS HTML模板是否存在语法错误、拼写错误和最佳实践。
validate_template({ html: '
' })
// → Error: Unknown attribute "bnd" — did you mean "bind"?explain_directive
获取任何NoJS指令的详细解释。
explain_directive({ directive: "each" })
// → Full explanation with syntax, examples, and noteslist_directives
列出所有指令,可选择按类别筛选。
list_directives({ category: "data" })
// → All data-fetching directives (get, post, put, patch, delete, etc.)类别: data, state, binding, conditionals, loops, events, styling, forms, routing, animation, dnd, i18n, refs, head, misc
scaffold_component
生成NoJS组件模板。
scaffold_component({ type: "form", features: ["validation", "i18n"] })
// → Complete login form with validation类型: form, list, detail, card, modal, nav
get_cheatsheet
获取一份简明的指令备忘单,以便快速参考。
发展
# Install dependencies
npm install
# Build
npm run build
# Run locally
node dist/index.js版本控制
此包版本始终与No.JS框架版本匹配。当前: 1.11.0
生态系统
许可证
麻省 理工© 埃里克 泽维尔
