weibo-refund-batch-mcp-kejia3
v0.1.5
Published
Stdio MCP server for batch refund processing from CSV files
Readme
Refund Batch MCP (npm)
An npm-publishable Stdio MCP server for batch refund processing from CSV files.
What it does
The MCP tools are:
get_runtime_authorizationbatch_refund_from_csv
batch_refund_from_csv:
- Reads a CSV file whose first three headers are
id,uid, andorder_id - Calls
get_tauth2_headerto fetch a fresh Authorization header - For each row, calls:
chargeBack/ignoreTimeLimitmaintainRefundorder/push
- Writes a result CSV and returns a structured summary
Package entry
After publishing to npm, the platform can start it with npx.
Suggested platform JSON config
Current package name:
weibo-refund-batch-mcp-kejia3
{
"mcpServers": {
"refund-batch": {
"command": "npx",
"args": [
"-y",
"weibo-refund-batch-mcp-kejia3"
]
}
}
}Authorization modes
You now have two ways to run the batch:
- Pass
authorizationdirectly tobatch_refund_from_csv - Pass
seed_authorizationand let the server callget_tauth2_headerfor you
Optional server-side fallback is still supported:
SEED_AUTHORIZATIONREFUND_BATCH_SEED_AUTHORIZATIONconfig/default-seed-authorization.txt
Current local default seed file is already populated, so this package can fetch a fresh runtime Authorization even when the tool caller does not pass one.
Local test
node ./bin/refund-batch-mcp.js --self-checkprintf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.0.1"}}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
| node ./bin/refund-batch-mcp.jsTool arguments
{
"csv_file": "/absolute/path/orders.csv",
"authorization": "Tauth2 token=\"...\""
}The CSV header must start with:
id,uid,order_idOr fetch a fresh token first:
{
"seed_authorization": "Tauth2 token=\"...\",param=\"uid%3D5058700742\",sign=\"...\""
}Publish
- Make sure the package name is available on npm
- Login with
npm login - Publish with:
npm publish --access publicImportant note
This MCP server is stdio based. The client machine running the MCP host must be able to access:
wblive.api.weibo.comi.fortune.api.weibo.com
And it must be able to read the local CSV file path passed into the tool.
