Back to MCP directory
publicPublicdnsLocal runtime

mcp-sample-vsc-debug

该项目展示了如何在VSCode中调试MCP服务器,包含Python和TypeScript的示例代码,并集成了MCP Inspector工具用于浏览器测试。

article

README

🚀 在VSCode中调试MCP服务器

本仓库提供了示例MCP服务器,并展示了如何在VSCode中对其进行调试。示例MCP服务器与 MCP快速入门 一致,采用Python和TypeScript编写。在调试时,会启动 MCP Inspector,方便您在浏览器中对工具进行测试。

🚀 快速开始

若要开始调试,请克隆此仓库,然后进入您所选语言对应的目录。

Python

# 进入Python项目目录
> cd python-weather/
# 使用VSCode打开项目
> code .

按照 README.md 中的步骤继续操作。

TypeScript

# 进入TypeScript项目目录
> cd typescript-weather/
# 使用VSCode打开项目
> code .

按照 README.md 中的步骤继续操作。

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