fortune-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fortune-mcp-serverDraw a three-card tarot spread for my career."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fortune-mcp-server
一个面向远程 AI Host 的只读命理 MCP Server。它通过 Streamable HTTP 暴露八字、黄历和塔罗工具,程序负责计算与抽取,语言模型负责理解问题和自然语言解释。
所有结果仅用于传统文化研究与娱乐,不应作为医疗、法律、投资或其他重大决定的依据。
工具
Tool | 输入 | 输出 | 性质 |
| 出生日期、时间、性别、可选地点 | 八字命盘与真太阳时信息 | 确定性计算 |
|
| 农历、干支、宜忌、神煞、方位、时辰宜忌 | 确定性计算 |
| 单牌或三牌阵、是否启用逆位 | 牌位、牌名、正逆位和关键词 | 安全随机抽取 |
三个 Tool 都会同时返回:
content:方便语言模型阅读的 JSON 文本;structuredContent:方便 MCP Host 做结构化处理的数据。
Related MCP server: Bazi MCP
设计边界
AI Host
│ Bearer Token
▼
POST /mcp
│ Streamable HTTP(无会话)
▼
McpServer
├─ calculate_bazi_chart ── shunshi-bazi-core
├─ get_daily_almanac ───── shunshi-bazi-core / tyme4ts
└─ draw_tarot_reading ──── 78 张静态牌组 + crypto.randomInt只提供远程 Streamable HTTP,不发布 npm CLI,也不提供 stdio 入口;
不访问本机文件,不执行任意代码,不发送邮件;
不保存用户输入、抽牌记录或 MCP 会话;
/mcp必须携带 Bearer Token,/health可以匿名访问;Server 只返回事实、计算结果和简短关键词,不在工具内部生成大段命理解读。
本地运行
要求 Node.js 20+ 与 pnpm 10。
pnpm install
$env:MCP_API_KEY="replace-with-a-long-random-token"
pnpm dev默认地址:
MCP:
http://127.0.0.1:3100/mcp健康检查:
http://127.0.0.1:3100/health
可选环境变量:
环境变量 | 默认值 | 说明 |
|
| HTTP 监听地址 |
|
| HTTP 监听端口 |
| 无 | 必填,至少 24 个字符 |
| 无 | 逗号分隔的 Host 白名单 |
Docker
复制环境变量示例并替换密钥:
Copy-Item .env.example .env
docker compose up --buildCompose 只把端口映射到本机 127.0.0.1:3100。正式部署时可以由 Caddy、Nginx 或其他网关代理 /mcp,同时设置实际域名对应的 MCP_ALLOWED_HOSTS。
MCP Client 示例
使用官方 TypeScript SDK 连接:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "example-host", version: "1.0.0" });
const transport = new StreamableHTTPClientTransport(
new URL("http://127.0.0.1:3100/mcp"),
{
requestInit: {
headers: {
Authorization: `Bearer ${process.env.MCP_API_KEY}`,
},
},
},
);
await client.connect(transport);
const tools = await client.listTools();
console.log(tools.tools.map((tool) => tool.name));
await transport.close();开发检查
pnpm check检查内容包括 ESLint、TypeScript、领域单元测试、真实 Streamable HTTP MCP Client 集成测试和生产构建。
目录结构
src/
├─ index.ts # 进程启动与优雅关闭
├─ app.ts # HTTP 路由与无会话 MCP transport
├─ config.ts # 环境变量解析
├─ http/
│ └─ auth.ts # Bearer Token 校验
├─ server/
│ └─ create-fortune-server.ts # 每个请求创建独立 McpServer
├─ tools/
│ ├─ register-bazi-tool.ts
│ ├─ register-almanac-tool.ts
│ ├─ register-tarot-tool.ts
│ └─ tool-result.ts
└─ domain/
├─ date.ts
└─ tarot/
├─ cards.ts # 完整 78 张牌数据
└─ draw.ts # Fisher–Yates 与正逆位抽取This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
BaZi (八字) MCP gateway + 玄学社区. 12 tools (4 fortune + 5 forum + 3 meta). x-api-key required.
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
BaZi four pillars, Chinese zodiac, lunisolar calendar and almanac days for AI agents.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceRemote MCP server for Zi Wei Dou Shu / Tu Vi Dau So astrology tools, exposing read-only tools like get_astrolabe, get_horoscope_decades, etc., designed for Railway deployment and OpenAI ChatGPT developer mode.
- AlicenseNot gradedqualityDmaintenanceMCP server for accurate Bazi calculations, enabling personality analysis, destiny forecasting, and Chinese calendar queries via AI agents.286ISC
- FlicenseNot gradedqualityBmaintenanceEnables traditional Chinese metaphysics tools like Bazi, Ziwei, and Qimen via MCP, integrating AI analysis for divination and fortune-telling.516
- AlicenseAqualityAmaintenanceProvides traditional Chinese astrology (Bazi, Ziwei) and divination (Liuyao, Meihua, Qimen, etc.) calculations as MCP tools for AI assistants.17230106Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/liu04919/fortune-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server