yeepay-mcp
The Yeepay MCP service provides integration with Yeepay services via the Model Context Protocol (MCP).
README
Yeepay MCP Service Integration
The Yeepay MCP service provides integration with Yeepay services via the Model Context Protocol (MCP).
Features
create_webpage_yeepay_payment: Create Yeepay webpage payment order- Required parameters:
orderId(string),amount(number),goodsName(string),userIp(string)
- Required parameters:
query_yeepay_payment_status: Query Yeepay payment order status- Required parameters:
orderId(string)
- Required parameters:
Prerequisites
- Node.js (LTS version recommended)
- pnpm (or npm)
Installation and Configuration
1. Installation
# Clone the repository
git clone https://github.com/yop-platform/yeepay-mcp.git
cd yeepay-mcp
# Install dependencies
npm install
# or
pnpm install
2. Configuration
Copy .env.example to .env and configure the following environment variables:
YOP_PARENT_MERCHANT_NO=Your parent merchant number
YOP_MERCHANT_NO=Your merchant number
YOP_APP_PRIVATE_KEY=Your private key
YOP_APP_KEY=Your application AppKey
YOP_NOTIFY_URL=https://your-domain.com/yeepay/notify
Usage
There are several ways to run and use this MCP service:
1. Run Locally
Development Mode (with hot-reloading)
npm run dev
# or
pnpm run dev
Production Mode
# Build the project
npm run build
# or
pnpm run build
# Start the service
npm start
# or
pnpm start
2. Run with Docker
# Build the image
docker build -t yeepay-mcp .
# Run the container (ensure the .env file exists)
docker run -p 3000:3000 --env-file .env yeepay-mcp
3. Call via npx
This project supports direct invocation via npx.
Local Project Invocation (Before Publishing)
Run in the project directory:
# First, build the project
npm run build
# Use npx to call the local package
npx . [arguments]
Or use the full path:
npx /absolute/path/to/yeepay-mcp [arguments]
Passing Arguments
You can pass arguments to the npx command:
npx . --port 3001 --host 0.0.0.0
Invocation After Publishing
Once the project is published to the npm registry, you can use it directly:
npx yeepay-mcp [arguments]
And you can specify a version:
npx yeepay-mcp@0.1.0 [arguments]
4. Integrate as an MCP Service
This service can be integrated into tools that support MCP (like Cline).
Startup Methods
Method 1: Package Runner (Recommended)
pnpm dlx yeepay-mcp
# or
npx yeepay-mcp
(Note: This method is available after the package is published to npm)
Method 2: Node (Local Development/Direct Path)
node /path/to/yeepay-mcp/dist/index.js
Important Note: Regardless of the startup method, the service needs access to the .env file in the working directory at runtime to obtain configuration.
Configure in Cline
Configure this service in Cline's MCP settings file (cline_mcp_settings.json).
Configure using Node (Local Development or Specific Path):
"yeepay-mcp": {
"command": "node",
"args": [
"/path/to/yeepay-mcp/dist/index.js" // Replace with the actual absolute path
],
"env": { // Alternatively, place the configuration in the .env file and ensure the service can read it
"YOP_PARENT_MERCHANT_NO": "Your parent merchant number",
"YOP_MERCHANT_NO": "Your merchant number",
"YOP_APP_PRIVATE_KEY": "Your private key",
"YOP_APP_KEY": "Your application AppKey",
"YOP_NOTIFY_URL": "https://your-domain.com/yeepay/notify"
},
"disabled": false,
"alwaysAllow": []
}
Configure using npx (After Publishing):
"yeepay-mcp": {
"command": "npx",
"args": [
"yeepay-mcp" // Package name
// You can add a version number, e.g., "yeepay-mcp@0.1.0"
// You can also add arguments, e.g., "--port", "3001"
],
"env": { // Same as above, env or .env file
"YOP_PARENT_MERCHANT_NO": "Your parent merchant number",
"YOP_MERCHANT_NO": "Your merchant number",
"YOP_APP_PRIVATE_KEY": "Your private key",
"YOP_APP_KEY": "Your application AppKey",
"YOP_NOTIFY_URL": "https://your-domain.com/yeepay/notify"
},
"disabled": false,
"alwaysAllow": []
}
Development Guide
Development Mode
Develop with hot-reloading:
pnpm run dev
# or
npm run dev
Commit Message Convention
This project uses the Conventional Commits specification to format commit messages. Each commit message should follow this format:
<type>(<scope>): <subject>
<body>
<footer>
Where:
- type: Indicates the type of commit, e.g.,
feat,fix,docs,style,refactor,test,chore, etc. - scope: (Optional) Indicates the scope affected by the commit, e.g.,
core,server,payment,config, etc. - subject: Briefly describe the content of the commit, use imperative, present tense.
- body: (Optional) Describe the content of the commit in detail, explaining the reason and method of modification.
- footer: (Optional) Contains information about breaking changes (
BREAKING CHANGE:) or closing issues (Closes #123).
Example:
feat(server): add health check endpoint
Add a new endpoint `/health` to check the health status of the server and its dependencies. This helps with monitoring and deployment verification.
Closes #123
BREAKING CHANGE: The configuration format for database connection has changed.
The project has configured commitlint and husky to automatically check if commit messages conform to the specification before committing. You can use .github/commit-template.txt as a template for commit messages.
Git Hooks
This project uses Husky to manage Git hooks:
- pre-commit: Runs
lint-stagedto automatically format and lint staged files - commit-msg: Validates commit messages using
commitlintto ensure they follow the Conventional Commits specification
The hooks are automatically installed when you run npm install and do not require any global installation of Husky.
Code Style
This project uses ESLint and Prettier to enforce and maintain code style consistency. Before committing code, lint-staged will automatically run to check and format staged files. Please ensure your editor is configured with the corresponding plugins for real-time feedback.
Release Process
Preparation
- Ensure the
versioninpackage.jsonis up-to-date. - Ensure the
binfield inpackage.jsoncorrectly points todist/index.jsso thatnpxcan execute it. - Ensure all changes are committed and the build is successful (
npm run build).
Manual Publishing to npm
- Log in to npm:
npm login - Publish:
npm publish # or if using pnpm pnpm publish
Automatic Publishing with GitHub Actions
This project is configured with GitHub Actions to automatically publish to npm when a GitHub Release is created.
- Create GitHub Release:
- On the GitHub repository page, click "Releases".
- Click "Draft a new release" or "Create a new release".
- Enter a Tag version matching the version number in
package.json(e.g.,v0.1.0). - Select the target branch (usually
mainormaster). - Enter the Release title (e.g.,
Version 0.1.0). - Add release notes (describe the changes in this version).
- Click "Publish release".
GitHub Actions will automatically trigger the .github/workflows/release.yml workflow to build and publish the package to npm.
Version Updates
Manual Version Update
Use the npm version command to update the version number in package.json and create a git tag:
# Patch version update (1.0.0 -> 1.0.1)
npm version patch
# Minor version update (1.0.0 -> 1.1.0)
npm version minor
# Major version update (1.0.0 -> 2.0.0)
npm version major
Then push to GitHub and publish manually:
git push --follow-tags
npm publish
Automatic Version Update with semantic-release (If Configured)
If the project is configured with semantic-release, version updates and publishing are usually automated based on Conventional Commits:
fix:commits trigger a patch version update.feat:commits trigger a minor version update.- Commits containing
BREAKING CHANGE:trigger a major version update.
After merging into the main branch, the CI/CD process automatically calculates the version, creates tags, generates release notes, and publishes to npm.
Post-Publish Verification
After successful publishing, you can verify in the following ways:
- Search for your package name (
yeepay-mcp) on the npm website. - In a new empty directory, try installing and running your package using
npx:npx yeepay-mcp --help # or other arguments
Contributing Guide
Contributions, bug reports, and improvement suggestions are welcome. Please follow these steps:
- Fork this repository to your GitHub account.
- Clone your forked repository locally:
git clone https://github.com/YOUR_USERNAME/yeepay-mcp.git - Create a new feature branch:
git checkout -b feature/your-amazing-feature - Make your code changes.
- Ensure you follow the commit message convention when committing changes:
git commit -m 'feat: add some amazing feature' - Push your branch to your fork:
git push origin feature/your-amazing-feature - Create a Pull Request in the original repository describing your changes.
License
This project is licensed under the Apache License. See the LICENSE file for details.
Contact
For questions or suggestions, please contact us via:
- Submit an Issue in the GitHub repository.
- Send an email to: dreambt@gmail.com
Tip
Before the package is published to the npm registry, ensure you use the correct local path or absolute path when configuring or calling it, instead of the package name, to avoid errors like "package was not found".
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。