@backendkit-labs/mcp-server

中文文档
0.18.5发布于 2026/10/27TypeScriptCommonJS近 30 天下载 2470

MCP server for agent-framework — skills, code intelligence, agent context

原始使用文档
文档目录19 节
  1. Table of contents
  2. Installation
  3. Running the server
  4. Stdio mode (default — for Claude Desktop, agent-core)
  5. HTTP mode (multi-session)
  6. Tools reference
  7. stack_detect
  8. code_index
  9. code_search
  10. code_context
  11. skills_search
  12. skills_install
  13. skills_list
  14. Code intelligence index
  15. Connecting via agent-core
  16. Connecting via Claude Desktop
  17. Multiple projects
  18. HTTP mode
  19. Environment variables

@backendkit-labs/mcp-server

MCP (Model Context Protocol) server that exposes code intelligence, skills management, and project context as tools for any MCP-compatible AI client (Claude Desktop, agent-core, Cursor, etc.).

npm

Status: stable — Maintained and production-ready. No new features during the pilot phase.

Table of contents


Installation

npm install -g @backendkit-labs/mcp-server
# or use via npx:
npx @backendkit-labs/mcp-server

Binary: bk-mcp


Running the server

Stdio mode (default — for Claude Desktop, agent-core)

bk-mcp

# Against a specific project
BK_CWD=/my-project bk-mcp

# With a custom app name
BK_APP_NAME=my-app BK_CWD=/my-project bk-mcp

HTTP mode (multi-session)

bk-mcp --http --port 3100

Tools reference

stack_detect

Detect the project's technology stack using file detection and the code index.

Args:
  cwd  string?  Project directory (defaults to server cwd)

Example:

What stack does this project use?
→ stack_detect()
→ "Detected stack: typescript, node, react, docker"

code_index

Index the codebase into a SQLite graph database. Incremental — only re-indexes changed files.

Args:
  cwd    string?   Project directory
  watch  boolean?  Enable file watcher for live updates (default: false)

Example:

Index this codebase
→ code_index({ watch: true })
→ "Indexed 234 files, 4,821 symbols. File watcher enabled."

What gets indexed: functions, classes, interfaces, types, enums from TypeScript/JS/Go/Python/Java/Kotlin. Callers and callees are recorded for each symbol (call graph).


code_search

Search for symbols by name or keyword.

Args:
  query  string   Symbol name or keyword
  limit  number?  Max results (default 20)

Example:

Where is TokenValidator defined?
→ code_search({ query: "TokenValidator" })
→ "**TokenValidator** (class) — src/auth/token-validator.ts:15
     class TokenValidator { validate(token: string): DecodedToken | null }"

Fuzzy search:

All functions related to payment
→ code_search({ query: "payment", limit: 30 })
→ PaymentProcessor, processPayment, validatePayment, createPaymentIntent, ...

code_context

Given a task description, find the most relevant symbols and return their code, callers, and callees. Bootstraps context for a coding task without manual file reading.

Args:
  task        string   Task or feature description
  max_symbols number?  Max symbols (default 10)

Example:

I need to add rate limiting to the login endpoint
→ code_context({ task: "add rate limiting to login endpoint" })
→ 
### loginHandler (function) — src/routes/auth.ts:67-89
> calledBy: router.post | calls: validateCredentials, createSession
\`\`\`typescript
async function loginHandler(req: Request, res: Response) {
  const { email, password } = req.body;
  ...
}
\`\`\`

The agent immediately knows which files and symbols are relevant.


skills_search

Search available skills by query.

Args:
  query  string   Search term
  cwd    string?  Project directory for stack detection

Example:

Find skills for TypeScript testing
→ skills_search({ query: "typescript testing" })
→ "- **ts-jest-setup** ✓ [global, typescript, ACTIVE]
     Configure Jest for TypeScript with proper transforms
   - **vitest-config** [node, typescript]
     Set up Vitest for unit testing"

✓ means the skill matches the detected stack.


skills_install

Install a skill pack from GitHub or a local path.

Args:
  source  string   GitHub URL or local path
  skill   string?  Install only a specific skill
  pack    string?  Override the derived pack name

Example:

Install our company skills repo
→ skills_install({ source: "https://github.com/my-org/agent-skills" })
→ "Installed pack "backend" with 12 skill(s)."

skills_list

List all installed skill packs.

Args: (none)

Example:

What packs are installed?
→ skills_list()
→ "**global** (builtin)
     Skills: code-review, refactor-pattern, ...
   **my-org-backend** (installed 2026-06-01)
     Skills: stripe-integration, postgres-pattern, ..."

Code intelligence index

The indexer uses Tree-sitter (WASM) to parse source code into a SQLite graph with symbols and their relationships. Storage location:

~/.{BK_APP_NAME}/code-index/{base64url(CWD)}.db

Default: ~/.deepseek-code/code-index/{hash}.db

Supported languages: TypeScript, JavaScript, Go, Python, Java, Kotlin, Rust.


Connecting via agent-core

import { createCodingEngine } from '@backendkit-labs/agent-coding';

const engine = createCodingEngine({
  providers:       { deepseek: { apiKey: process.env.DEEPSEEK_API_KEY! } },
  defaultProvider: 'deepseek',
  mcpServers: [
    {
      name:    'code-intelligence',
      command: 'bk-mcp',
      args:    [],
      env: {
        BK_APP_NAME: 'my-app',
        BK_CWD:      process.cwd(),
      },
    },
  ],
  subAgentContextMessages: 20,
});

// Index then query
await engine.run('Index this codebase');
await engine.run('Find all functions that directly access the database without using the repository layer');

Connecting via Claude Desktop

Add to your Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "bk-code": {
      "command": "bk-mcp",
      "env": {
        "BK_APP_NAME": "claude-code",
        "BK_CWD":      "/path/to/your/project"
      }
    }
  }
}

Restart Claude Desktop — the tools will appear in the tool picker.

Multiple projects

{
  "mcpServers": {
    "bk-api": {
      "command": "bk-mcp",
      "env": { "BK_CWD": "/projects/api-server", "BK_APP_NAME": "claude-code" }
    },
    "bk-frontend": {
      "command": "bk-mcp",
      "env": { "BK_CWD": "/projects/frontend", "BK_APP_NAME": "claude-code" }
    }
  }
}

HTTP mode

BK_CWD=/my-project bk-mcp --http --port 3100

Connect:

await mcp.connectStreamableHTTP({
  name:    'code-intelligence',
  baseUrl: 'http://localhost:3100',
});

Environment variables

VariableDefaultDescription
BK_APP_NAMEdeepseek-codeApp name — determines ~/.{name}/ storage
BK_CWDprocess.cwd()Project directory to index and serve

版本与发布记录

@backendkit-labs/mcp-server 共发布 19 个版本,首次发布于 2026/06/05;过去 12 个月发布了 19 个版本。

版本发布日期距今
0.18.5latest2026/10/2711 天前
0.18.42026/10/2712 天前
0.18.32026/10/2712 天前
0.18.22026/10/2612 天前
0.18.12026/10/2612 天前
0.18.02026/10/2514 天前

关于 @backendkit-labs/mcp-server 的常见问题

@backendkit-labs/mcp-server 是什么?

MCP server for agent-framework — skills, code intelligence, agent context

如何安装 @backendkit-labs/mcp-server?

在项目目录运行 npm install @backendkit-labs/mcp-server,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bk-mcp,可以用 npx bk-mcp 直接运行。

@backendkit-labs/mcp-server 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@backendkit-labs/mcp-server 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@backendkit-labs/mcp-server 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@backendkit-labs/mcp-server 可以商用吗?

@backendkit-labs/mcp-server 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@backendkit-labs/mcp-server 的下载量有多少?

根据 npm 官方下载统计,@backendkit-labs/mcp-server 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,470 次,日均约 82 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@backendkit-labs/mcp-server 还在维护吗?

最新版本 0.18.5 发布于 2026/10/27(11 天前);至今共发布 19 个版本,其中过去 12 个月发布了 19 个;首次发布于 2026/06/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。