TianGong-LCA-MCP Server

by linancn
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Enables configuration of the MCP server through environment variables loaded from .env files.

  • Allows containerized deployment of the MCP server using Docker, with configuration through environment variables and port publishing.

  • Provides the runtime environment for the MCP server with version management support.

TianGong-LCA-MCP

中文 | English

TianGong LCA Model Context Protocol (MCP) Server 支持 STDIO 和 SSE 两种协议。

启动 MCP 服务器

客户端 STDIO 服务器

npm install -g @tiangong-lca/mcp-server npx dotenv -e .env -- \ npx @tiangong-lca/mcp-server

远程 SSE 服务器

npm install -g @tiangong-lca/mcp-server npm install -g supergateway npx dotenv -e .env -- \ npx -y supergateway \ --stdio "npx -y @tiangong-lca/mcp-server" \ --port 3001 \ --ssePath /sse --messagePath /message

使用 Docker

# 使用 Dockerfile 构建 MCP 服务器镜像(可选) docker build -t linancn/tiangong-lca-mcp-server:0.0.1 . # 拉取 MCP 服务器镜像 docker pull linancn/tiangong-lca-mcp-server:0.0.1 # 使用 Docker 启动 MCP 服务器 docker run -d \ --name tiangong-lca-mcp-server \ --publish 3001:80 \ --env-file .env \ linancn/tiangong-lca-mcp-server:0.0.1

开发

环境设置

# 安装 Node.js curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash nvm install 22 nvm use # 安装依赖 npm install # 更新依赖 npm update && npm ci

代码格式化

# 使用代码检查工具格式化代码 npm run lint

本地测试

STDIO 服务器

# 使用 MCP Inspector 启动 STDIO 服务器 npm start

SSE 服务器

# 打包当前项目 npm run build && npm pack # 如果需要可以全局安装 supergateway(可选) npm install -g supergateway # 启动 SSE 服务器,如配置了参数 --baseUrl ,应设置为有效的 IP 地址或域名 npx dotenv -e .env -- \ npx -y supergateway \ --stdio "npx -y tiangong-lca-mcp-server-0.0.1.tgz" \ --port 3001 \ --ssePath /sse \ --messagePath /message # 启动 MCP Inspector npx @modelcontextprotocol/inspector

发布

npm login npm run build && npm publish

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

A Model Context Protocol server that supports both STDIO and SSE protocols for TianGong Life Cycle Assessment (LCA) applications.

  1. 启动 MCP 服务器
    1. 客户端 STDIO 服务器
    2. 远程 SSE 服务器
    3. 使用 Docker
  2. 开发
    1. 环境设置
    2. 代码格式化
    3. 本地测试
    4. 发布
ID: k6isarfwd0