Skip to main content
Glama
snapyharry-potter

iztro OpenAI MCP for Railway

iztro OpenAI MCP for Railway

用于紫微斗数工具的远程 MCP 服务器,已为 Railway 和 OpenAI ChatGPT 开发者模式做好准备。

我发现了什么

  • 截至 2026-04-24,npm 注册表中无法找到 @feida/iztro-mcp-server

  • 当前活跃的公共包是 @xzkcz/iztro-mcp-server@2.2.1

  • @xzkcz/iztro-mcp-server 的 npm 发布时间线:

    • 1.0.3 发布于 2025-07-26

    • 1.0.4 发布于 2025-10-03

    • 2.2.1 发布于 2025-12-03

  • 该包的元数据仍指向 https://github.com/xzkcz/iztro-mcp-server.git,但在 2026-04-24 验证时,该 GitHub 仓库返回了 404

  • 该发布包本身小巧轻便,但其入口点以 transportType: "stdio" 开头,因此如果没有包装器,它无法直接作为 OpenAI 的公共远程 MCP 端点使用。

Related MCP server: 命盘 Mingpan

为什么存在这个包装器

  • OpenAI 远程 MCP 通过 Streamable HTTP 或 HTTP/SSE 工作。

  • 上游 npm 包仅支持 stdio

  • 本项目重新实现了有用的只读占星工具,并将其暴露在以下地址:

    • GET /

    • GET /health

    • POST /mcp 及相关的 Streamable HTTP 流量

    • GET /sse

包含的工具

  • get_astrolabe

  • get_horoscope_decades

  • get_horoscope_ages

  • get_horoscope_years

  • get_horoscope_months

  • get_mutaged_places

gen_astrolabe 被特意排除在外,因为它会将文件写入磁盘,对于公共只读 MCP 部署没有用处。

Surface Pro 4 适配检查

  • 从资源角度来看,此工作负载对于配备 Core m3、4 GB RAM 和 128 GB 存储空间的 Surface Pro 4 来说足够轻量。

  • 从 npm 检查的发布包大小:

    • @xzkcz/iztro-mcp-server: 解压后 67,010 字节

    • iztro: 解压后 2,138,358 字节

    • fastmcp: 解压后 1,332,900 字节

    • lunar-typescript: 解压后 1,360,545 字节

  • 实际问题:要让 ChatGPT 调用它,你需要一个公共 HTTPS 端点。由于这台机器尚未安装 Node,且本地托管仍需要隧道或公共入口,Railway 是更简洁的部署目标。

部署到 Railway

  1. 将此文件夹放入 Git 仓库。

  2. 推送到 GitHub。

  3. 在 Railway 中,从该仓库创建一个新项目。

  4. Railway 应该会自动检测 Node 并运行 npm start

  5. 部署后,您的 MCP 端点将是:

https://YOUR-APP.up.railway.app/mcp

健康检查:

https://YOUR-APP.up.railway.app/health

落地页:

https://YOUR-APP.up.railway.app/

从 ChatGPT 连接

根据 2026-04-24 的 OpenAI 文档验证:

  • ChatGPT 开发者模式支持通过 SSEstreaming HTTP 进行远程 MCP 连接。

  • 支持的认证模式包括 OAuthNo AuthenticationMixed Authentication

推荐设置:

  1. 在网页端打开 ChatGPT。

  2. 进入 Settings -> Apps -> Advanced settings -> Developer mode

  3. 开启开发者模式。

  4. 点击 Create app

  5. 使用:

    • Server URL: https://YOUR-APP.up.railway.app/mcp

    • Authentication: No Authentication

OpenAI Responses API 示例

{
  "model": "gpt-5.4",
  "input": "Lap la so cho ngay 2000-08-16 luc 2 gio sang, nam, locale zh-CN",
  "tools": [
    {
      "type": "mcp",
      "server_label": "iztro",
      "server_url": "https://YOUR-APP.up.railway.app/mcp",
      "require_approval": "never"
    }
  ]
}

由于此处暴露的每个工具都是只读的,require_approval: "never" 是一个合理的默认设置。

如果需要,稍后可在本地运行

npm install
npm start

本地端点:

  • http://localhost:3000/mcp

  • http://localhost:3000/sse

  • http://localhost:3000/health

如果您希望公网上的 ChatGPT 调用本地机器,您仍然需要一个公共 HTTPS 隧道,例如 Cloudflare Tunnel 或其他入口层。

Windows 一键本地托管

本仓库现在包含适用于 Windows 的辅助脚本:

powershell -ExecutionPolicy Bypass -File .\start-local-public.ps1

该命令:

  • 在本地端口 3000 启动 MCP 服务器

  • 首先尝试使用 Cloudflare Quick Tunnel 建立公共 HTTPS 隧道

  • 如果 Cloudflare 不可用,则回退到 localhost.run

  • 打印您可以粘贴到 ChatGPT 中的公共 MCP URL

使用本地公共隧道时,请将 ChatGPT 连接到 /mcp URL,而不是 /sse。 本项目旨在通过 Streamable HTTP 用于 OpenAI MCP 客户端。

停止所有服务:

powershell -ExecutionPolicy Bypass -File .\stop-local-public.ps1

当前活跃的公共 MCP URL 也被写入到:

.\.runtime\public-url.txt

如果启动窗口没有清晰显示 URL,您可以通过以下方式恢复它:

powershell -ExecutionPolicy Bypass -File .\get-public-url.ps1

创建干净的 Railway zip 包

要生成不包含 node_modules 或运行时日志的干净部署包:

powershell -ExecutionPolicy Bypass -File .\pack-railway.ps1

这将创建:

..\iztro-openai-mcp-railway-ready.zip
F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Zi Wei Dou Shu (Chinese astrology) charting MCP server. Generates complete ziwei natal charts and transit overlays (12 palaces, 14 major stars, sihua) from birth date and time, powered by FateStar's reversible charting engine.
    16
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides traditional Chinese astrology (Bazi, Ziwei) and divination (Liuyao, Meihua, Qimen, etc.) calculations as MCP tools for AI assistants.
    17
    28
    103
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables BaZi and Zi Wei Dou Shu calculations through a stateless MCP server deployed on Cloudflare Workers, providing tools like bazi_chart and ziwei_chart with Markdown-only results.

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snapyharry-potter/iztro-openai-mcp-railway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server