@codeqr/ts-mcp

中文文档
0.25.0发布于 2026/11/09Apache-2.0TypeScriptESM + CJS近 30 天下载 4291

The official MCP Server for the CodeQR API

原始使用文档
文档目录9 节
  1. Installation
  2. Direct invocation
  3. Via MCP Client
  4. Cursor
  5. VS Code
  6. Claude Code
  7. Code Mode
  8. Where code runs
  9. Running remotely

CodeQR TypeScript MCP Server

It is generated with Stainless.

Installation

Direct invocation

You can run the MCP Server directly via npx:

export CODEQR_API_KEY="My API Key"
npx -y @codeqr/ts-mcp@latest

Via MCP Client

There is a partial list of existing clients at modelcontextprotocol.io. If you already have a client, consult their documentation to install the MCP server.

For clients with a configuration JSON, it might look something like this:

{
  "mcpServers": {
    "codeqr_ts_api": {
      "command": "npx",
      "args": ["-y", "@codeqr/ts-mcp"],
      "env": {
        "CODEQR_API_KEY": "My API Key"
      }
    }
  }
}

Cursor

If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables in Cursor's mcp.json, which can be found in Cursor Settings > Tools & MCP > New MCP Server.

Add to Cursor

VS Code

If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables in VS Code's mcp.json, which can be found via Command Palette > MCP: Open User Configuration.

Open VS Code

Claude Code

If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your environment variables in Claude Code's .claude.json, which can be found in your home directory.

claude mcp add codeqr_ts_mcp_api --env CODEQR_API_KEY="My API Key" -- npx -y @codeqr/ts-mcp

Code Mode

This MCP server is built on the "Code Mode" tool scheme. In this MCP Server, your agent will write code against the TypeScript SDK, which will then be executed in a sandbox. To accomplish this, the server will expose two tools to your agent:

  • The first tool is a docs search tool, which can be used to generically query for documentation about your API/SDK.

  • The second tool is a code tool, where the agent can write code against the TypeScript SDK. The code is executed in a sandbox whose filesystem and network access are restricted to what the SDK needs — see "Where code runs" below. Then, anything the code returns or prints will be returned to the agent as the result of the tool call.

Using this scheme, agents are capable of performing very complex tasks deterministically and repeatably.

Where code runs

This server runs code locally. Each code tool call is executed in a Deno subprocess on the same machine as the MCP server, restricted to reading the server's own files and to making network requests to your API host.

Deno must be installed for the code tool to work. Install it from https://deno.land, or add it to the MCP server's dependencies with npm install deno.

Running remotely

Launching the client with --transport=http launches the server as a remote server using Streamable HTTP transport. The --port setting can choose the port it will run on, and the --socket setting allows it to run on a Unix socket.

Authorization can be provided via the Authorization header using the Bearer scheme.

Additionally, authorization can be provided via the following headers:

HeaderEquivalent client optionSecurity scheme
x-codeqr-api-keyapiKeytoken

A configuration JSON for this server might look like this, assuming the server is hosted at http://localhost:3000:

{
  "mcpServers": {
    "codeqr_ts_api": {
      "url": "http://localhost:3000",
      "headers": {
        "Authorization": "Bearer <auth value>"
      }
    }
  }
}

版本与发布记录

@codeqr/ts-mcp 共发布 12 个版本,首次发布于 2025/09/16;过去 12 个月发布了 7 个版本。

版本发布日期距今
0.25.0latest2026/11/091 天前
0.24.12026/07/283 个月前
0.24.02026/07/283 个月前
0.19.32026/03/207 个月前
0.9.02025/12/1310 个月前
0.8.02025/12/0411 个月前

关于 @codeqr/ts-mcp 的常见问题

@codeqr/ts-mcp 是什么?

The official MCP Server for the CodeQR API

如何安装 @codeqr/ts-mcp?

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

@codeqr/ts-mcp 支持 TypeScript 吗?

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

@codeqr/ts-mcp 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@codeqr/ts-mcp 可以商用吗?

@codeqr/ts-mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@codeqr/ts-mcp 的下载量有多少?

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

@codeqr/ts-mcp 还在维护吗?

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