Bun-DX MCP(注:这个翻译可能需要根据具体上下文调整,因为“Bun-DX MCP”可能是一个特定产品、技术或概念的名称,没有直接的中文对应。以下是一个基于假设的通用翻译)
Bun-DX的模型上下文协议集成 - 与Cursor、Windsurf以及其他MCP兼容助手配合使用的AI辅助开发工具。
🚀 什么是MCP?
该 模型上下文协议 使AI助手能够访问外部工具和数据源。此仓库提供了MCP服务器和客户端,用于将Bun-DX的开发工具与您的AI编码助手进行集成。
📦 包裹
@dx/mcp-client 翻译成中文可以是:“@dx/mcp客户端” 或者 “dx的mcp客户端(模块/组件)”。这里,“@dx”可能是一个组织、项目或用户标识,“mcp-client”则指的是某个具体的客户端模块或组件。具体翻译可能需要根据上下文来调整
用于程序化访问MCP的TypeScript客户端。为MCP服务器提供类型化的接口。
import { tools } from '@dx/mcp-client';
const results = await tools.search('bun features');
const users = await tools.db('SELECT * FROM users');
const content = await tools.fs('read', 'package.json');@bun-dx/mcp-server-bun(可翻译为):@bun-dx/mcp-服务器-bun(注:这里的“bun”可能是一个特定项目或技术的名称,在中文中直接保留原样,若“bun”有特定含义或需意译,则需根据上下文调整翻译。)
MCP服务器提供智能的Bun项目上下文和运行时诊断功能。
# Install globally
bun add -g @bun-dx/mcp-server-bun
# Run the server
bunx @bun-dx/mcp-server-bun可用工具:
get_project_info- 项目配置和结构get_runtime_info- Bun 运行时诊断list_dependencies- 依赖分析analyze_package- Bun-DX 特定见解
可用资源:
package.json- 项目配置bunfig.toml- 面包配置tsconfig.json- TypeScript 配置
🚀 快速入门
安装MCP服务器
bun add -g @bun/mcp-docs @dx/mcp-db @dx/mcp-fs创建MCP驱动的项目
bun create bun-dx/mcp-starter my-ai-app
cd my-ai-app
bun install配置您的AI助手
添加到您的MCP配置中(例如,Cursor的 .cursor/mcp.json):
{
"mcpServers": {
"bun-docs": {
"command": "bun",
"args": ["x", "@bun/mcp-docs"]
},
"sqlite-db": {
"command": "bun",
"args": ["x", "@dx/mcp-db", "--db", "path/to/database.db"]
},
"filesystem": {
"command": "bun",
"args": ["x", "@dx/mcp-fs"]
}
}
}🎯 特点
- 📚 文档搜索 - 立即访问 Bun 文档
- 🗄️ 数据库查询 - 对您的SQLite数据库进行SQL访问
- 📁 文件系统操作 - 具有.gitignore意识的文件操作
- 🔧 TypeScript 客户端 - 通过编程方式访问,具有完整的类型安全性
🏗️ 建筑学
Bun-DX MCP
├── packages/mcp-client/ # TypeScript client library
├── packages/mcp-server-bun/ # Bun project MCP server
├── mcp-starter/ # Project template
├── demo.tape # Terminal demo recording
└── docs/ # Documentation & assets📋 MCP 服务器列表
| 服务器 | 软件包 | 用途 |
|---|---|---|
@bun/mcp-docs | 文档搜索 | 立即访问 Bun 文档 |
@bun-dx/mcp-server-bun | 项目智能 | 面包项目上下文与运行时诊断 |
@dx/mcp-db | 数据库操作 | 查询 SQLite 数据库 |
@dx/mcp-fs | 文件系统工具 | 使用 gitignore 进行文件操作 |
🤝 贡献(或“参与贡献”)
查看主页 Bun-DX 仓库 关于贡献指南。
