内容
# @jolter/mcp-server
官方 [模型上下文协议](https://modelcontextprotocol.io/) (MCP) 服务器,适用于 [Jolter](https://jolter.dev) — 一个快速、可靠的 JavaScript 运行时和工具链管理器。
将您的 AI 编程助手(Cursor、VS Code、Claude Desktop、Windsurf)连接到完整的 Jolter 文档、配置模式和 CLI 参考。
## 安装
通过 `npx` 运行 MCP 服务器:
```sh
npx @jolter/mcp-server
```
或全局安装:
```sh
npm install -g @jolter/mcp-server
jolter-mcp-server
```
## 编辑器设置
### Cursor
添加到 `.cursor/mcp.json`:
```json
{
"mcpServers": {
"jolter": {
"command": "npx",
"args": ["-y", "@jolter/mcp-server"]
}
}
}
```
### Claude Desktop
添加到 `claude_desktop_config.json`:
```json
{
"mcpServers": {
"jolter": {
"command": "npx",
"args": ["-y", "@jolter/mcp-server"]
}
}
}
```
### VS Code (Roo Code / Cline / Continue)
添加到 `.vscode/mcp.json`:
```json
{
"mcpServers": {
"jolter": {
"command": "npx",
"args": ["-y", "@jolter/mcp-server"]
}
}
}
```
### Windsurf
添加到 `~/.codeium/windsurf/mcp_config.json`:
```json
{
"mcpServers": {
"jolter": {
"command": "npx",
"args": ["-y", "@jolter/mcp-server"]
}
}
}
```
## 可用工具
| 工具 | 参数 | 描述 |
| :---------------- | :----------------------- | :----------------------------------------------- |
| `search_docs` | `query` _(字符串)_ | 按关键词或主题搜索 Jolter 文档。 |
| `get_doc` | `slug` _(字符串)_ | 检索文档页面的完整 Markdown 内容。 |
| `list_all_pages` | — | 列出按章节分组的所有文档页面。 |
| `get_jolter_info` | — | 一般信息:运行时、工具、配置模式。 |
| `explain_config` | `configJson` _(字符串)_ | 验证并解释 `jolter.json` 文件。 |
| `fetch_llms_txt` | `fullBundle` _(布尔值)_ | 获取 `/llms.txt` 或 `/llms-full.txt`。 |
## 可用资源
所有 41 个文档页面都作为 `docs://` 资源公开,MIME 类型为 `text/markdown`。示例:`docs://quickstart`,`docs://reference/commands`。
## 可用提示
| 提示 | 描述 |
| :-------------------------- | :----------------------------------------------- |
| `setup_jolter_ci` | 生成 GitHub Actions 或 GitLab CI 工作流。 |
| `explain_jolter_config` | 解释 `jolter.json` 以进行团队入职。 |
| `troubleshoot_jolter_issue` | 诊断 PATH、权限或运行时问题。 |
## 开发
```sh
bun install
bun run build
bun run start
```
## 文档
完整文档可在 [jolter.dev/docs/automation/mcp-server](https://jolter.dev/docs/automation/mcp-server) 获取。
## 许可证
[MIT](LICENSE)