mcp

mcp
Guvenlik Denetimi
Basarisiz
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 9 GitHub stars
Code Basarisiz
  • spawnSync — Synchronous process spawning in scripts/build.mjs
  • process.env — Environment variable access in scripts/ci/check-release-tag.cjs
  • fs module — File system access in scripts/ci/check-release-tag.cjs
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Model Context Protocol (MCP) server connecting AI agents to TianGong LCA databases and workflows

README.md

title: TianGong LCA MCP README EN
docType: guide
scope: repo
status: active
authoritative: false
owner: mcp
language: en
whenToUse:

  • when you need English user-facing MCP package setup, Docker usage, local startup, or inspector examples
    whenToUpdate:
  • when English startup commands, Docker usage, package invocation, or user-facing MCP examples change
    checkPaths:
  • README.md
  • README_CN.md
  • package.json
  • Dockerfile
  • mcp_config.json
  • src/index.ts
  • src/index_server.ts
  • src/index_server_local.ts
  • src/http_app.ts
  • src/http_app_local.ts
    lastReviewedAt: 2026-11-29
    lastReviewedCommit: 6d136930ecb17b38554b21227103018c5dbbc71a
    lastReviewedNote: 'MCP #128: added package homepage/keywords metadata and canonical Docs, Portal, and Prism discovery links; transports, OAuth, tools, and package version remain unchanged.'
    related:
  • AGENTS.md
  • .docpact/config.yaml
  • DEV_EN.md
  • README_CN.md

TianGong-LCA-MCP

中文 | English

TianGong LCA Docs | TianGong LCA Database | TianGong LCA Knowledge Base

TianGong LCA Model Context Protocol (MCP) Server supports STDIO and Streamable Http protocols.

Environment

Copy .env.example and populate its Supabase issuer, publishable key, exact admitted public OAuth client IDs, and allowed browser origins. OAuth authentication requires no Redis, confidential client secret, or server-side session encryption key.

GLAD dataset search tools additionally require a GLAD API key:

GLAD_API_KEY=your-glad-api-key
GLAD_API_BASE_URL=https://www.globallcadataaccess.org/api/v1

Remote OAuth

Remote Streamable HTTP is an OAuth 2.1 protected resource. A compatible MCP host discovers /.well-known/oauth-protected-resource/mcp, follows its Supabase Auth authorization server, opens the user's browser, and completes Authorization Code with S256 PKCE. The user signs in and consents in Next; usernames and passwords are never entered into the AI or MCP host.

Supabase issues the access and rotating refresh tokens directly to the public MCP client. The client stores its refresh token locally and sends the short-lived Supabase ES256 access JWT on every MCP request. The server verifies signature, issuer, audience, expiry, role/session, and exact client_id; Edge/PostgREST then re-verify the same user/client context and enforce RLS capabilities.

Dynamic Client Registration remains disabled. Operators register exact public clients and loopback callbacks in Supabase, then list those UUID client IDs in MCP_OAUTH_ALLOWED_CLIENT_IDS_JSON. Unknown, malformed, expired, Cognito, and password/API-key bearers fail the canonical OAuth challenge without fallback I/O.

The MCP origin exposes no authorization, token, refresh, revoke, callback, registration, demo, or authorization-code display endpoint. Supabase Auth owns those protocol operations and Next owns /oauth/consent.

Starting MCP Server

Client STDIO Server

Set SUPABASE_BASE_URL explicitly to your own backend before using Supabase search tools. There is no default production backend. Missing or invalid backend configuration fails locally before a request; STDIO initialization, tool listing, and local guidance remain available. Database operations also require your backend's SUPABASE_PUBLISHABLE_KEY. Authenticated HTTP continues to require the full OAuth configuration above.

corepack install --global [email protected]
pnpm add --global @tiangong-lca/mcp-server

pnpm dlx dotenv-cli -e .env -- tiangong-lca-mcp-stdio

Using Docker

The checked-in Dockerfile installs published @tiangong-lca/[email protected], rather than building this checkout. Source changes apply to a checkout build; existing npm packages and images need a separately reviewed release to receive them.

# Build the MCP server image locally using Dockerfile
docker build -t linancn/tiangong-lca-mcp-server:0.3.0 .

# Start MCP server using Docker
docker run -d \
    --name tiangong-lca-mcp-server \
    --publish 9278:9278 \
    --env-file .env \
    linancn/tiangong-lca-mcp-server:0.3.0

Local Testing

STDIO Server

# Launch the STDIO Server using MCP Inspector
pnpm start

Streamable Http Server

pnpm start:server

Streamable Http Local Server

pnpm start:server-local

The HTTP start commands launch MCP Inspector through a cross-platform Node argv wrapper and inject the development-only Inspector environment without POSIX shell syntax.

LCA calculation

Use Study_API_Tool over authenticated HTTP to create a calculation project, prepare a model, submit a run and read its results with an explicit V2 request. Read the selected family’s request schema and call capability.read to see what your server and OAuth context allow.

The source also supports V3–V6 for optional analysis, reporting, review, sharing and method assessment. V5 and V6 require separate runtime admission and are off by default. The server reauthorizes every call. Keep the original mutation request and key for recovery; the tool does not disclose raw source packets. The Study consumer contract explains download integrity and qualification. Package publication and hosted activation are separate from source support.

Yorumlar (0)

Sonuc bulunamadi