Back to MCP directory
publicPublicdnsLocal runtime

mcp-vsc-button-gen

一个生成VS Code MCP安装按钮的微型Node服务器,支持通过NPX直接运行并创建稳定版和Insiders版的安装按钮。

article

README

🚀 mcp-vsc-button-gen

mcp-vsc-button-gen 是一个轻量级的 MCP 服务器,专为基于 NPX 的服务器生成 VS Code MCP 安装按钮(稳定版 + 内测版)。

🚀 快速开始

你可以直接通过 NPX 运行该项目(无需安装):

npx mcp-vsc-button-gen

📦 安装指南

在 VS Code 中安装

你可以通过以下按钮在 VS Code 稳定版和内测版中进行安装:

  • Install with NPX in VS Code
  • Install with NPX in VS Code Insiders

✨ 主要特性

该项目提供了以下工具函数:

make_install_buttons

  • 输入{ name: string, inputs?: MCPInput[], config?: CommandConfig }
  • 输出:包含两个徽章/链接的 Markdown 字符串。

from_mcp_config

  • 输入{ name: string, mcp: { inputs?: MCPInput[], config?: CommandConfig } }
  • 输出:包含两个徽章/链接的 Markdown 字符串。

copilot_buttons_from_raw

  • 输入{ kind: 'chat-instructions' | 'chat-prompt' | 'chat-mode', url: string }
  • 输出:包含两个指向 vscode.dev/insiders 安装重定向链接的 Markdown 徽章。

copilot_buttons_from_github

  • 输入{ kind: 'chat-instructions' | 'chat-prompt' | 'chat-mode', owner: string, repo: string, path: string, branch?: string }
  • 输出:与上述类似的包含两个徽章的 Markdown 字符串。

类型定义

  • MCPInput{ type: 'promptString', id: string, description?: string, password?: boolean }
  • CommandConfig{ command: 'npx', args?: string[], env?: Record<string,string> }

💻 使用示例

基础用法

以下是一个输入示例:

{
  "name": "supabase",
  "inputs": [
    { "type": "promptString", "id": "supabase-access-token", "description": "Supabase personal access token", "password": true }
  ],
  "config": {
    "command": "npx",
    "args": ["-y", "@supabase/mcp-server-supabase@latest", "--readonly", "--project-ref=$SUPABASE_MCP_PROJECT_REF"],
    "env": {
      "SUPABASE_ACCESS_TOKEN": "${input:supabase-access-token}",
      "SUPABASE_MCP_PROJECT_REF": "${input:supabase-project-ref}"
    }
  }
}

输出:生成稳定版和内测版的两个 Markdown 按钮。

🔧 技术细节

本地开发

本地开发步骤如下:

  1. 安装依赖
  2. 构建项目
  3. 通过标准输入输出运行(用于手动测试)

快速开始命令

npm i
npm run build
node dist/index.js

你也可以在开发模式下运行:

npm run dev

该服务器使用 MCP 标准输入输出进行通信,你可以将其与 MCP 客户端集成来调用工具。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client