Back to MCP directory
publicPublicdnsLocal runtime

weather-mcp-lma

一个天气项目,包含SSE和Stdio两种服务运行方式

article

README

🚀 SSE与Stdio服务器项目

本项目提供了SSE服务器和Stdio服务器的搭建与使用方案,能帮助开发者快速配置相关服务。

🚀 快速开始

📦 安装指南

安装项目所需的依赖项,使用以下命令:

bun install

💻 使用示例

SSE 服务器

基础用法

运行服务 启动SSE服务器,使用以下命令:

bun run src/mcp/sse-server.ts

客户端配置 客户端需要进行如下配置,将配置信息写入JSON文件:

{
  "url" : "http://localhost:3000/sse"
}

Stdio 服务器

客户端配置 Stdio服务器的客户端需要进行如下配置,将配置信息写入JSON文件:

{
  "command" : "bun",
  "args": [
    "run",
    "<路径>/src/mcp/stdio-server.ts"
  ]
}
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