coupon-mcp-server
v0.1.3
Published
Minimal MCP server that proxies coupon APIs (no DB, no auth)
Maintainers
Readme
coupon-mcp-server
Minimal MCP (Model Context Protocol) server that proxies HTTP GET requests to a built‑in data source.
No database. No authentication. Zero configuration for end users. Published on npm as coupon-mcp-server.
—
最小化的 MCP(Model Context Protocol)服务端,仅将 HTTP GET 请求转发到内置数据源。
无需数据库、无需鉴权、开箱即用。已发布到 npm:coupon-mcp-server。
1) Features 功能特性
- Zero‑config:内置数据源,无需环境变量
- MCP stdio:兼容 MCP 客户端
- Single tool:仅暴露一个清晰的工具,避免歧义
- 轻量:聚焦 JSON 优先返回
2) Requirements 环境要求
- Node.js >= 18.17
3) Install & Run (npx) 安装与启动
Run directly without local install 直接运行(无需本地安装):
npx -y coupon-mcp-serverThe server runs over stdio and awaits MCP client connections. 服务端通过 stdio 工作,等待 MCP 客户端连接。
4) MCP Client Integration 客户端集成
Add this to your MCP client configuration (stdio). 将以下片段加入你的 MCP 客户端配置。
{
"mcpServers": {
"coupon": {
"command": "npx",
"args": ["-y", "coupon-mcp-server"]
}
}
}No environment variables are required; BASE_URL is ignored.
无需配置环境变量;BASE_URL 会被忽略。
5) Tools 工具
jutuike.public_promo_list- Input 输入:
{ query? } - Description 说明:固定路径 GET
/api/mcp/jutuike/public_promo_list,可携带查询参数
- Input 输入:
6) Usage 示例
Minimal call 最小调用:
{
"query": { "page": 1, "size": 20 }
}7) Behavior 行为
- If upstream returns JSON (
content-type: application/json), the tool returns{ type: "json", json: ... }. - Otherwise returns
{ type: "text", text: "Status <code>: <body>" }.
若上游返回 JSON(content-type: application/json),工具返回 { type: "json", json: ... };
否则返回 { type: "text", text: "Status <code>: <body>" }。
8) Local Development 本地开发
npm install
node server.js9) Versioning 版本
- Semantic versioning 语义化版本。npx 将获取最新版本,或使用
npm update coupon-mcp-server。
10) License 许可
MIT(见 LICENSE)。
11) Security 安全
This server is intentionally open (no auth). Do not proxy sensitive/internal data. 本服务端有意保持开放(无鉴权)。请勿用于敏感或内部数据的代理。
