@azhena/hly-mcp
v0.1.1
Published
MCP server for querying and operating HLY expense reports and related data
Maintainers
Readme
HLY_MCP
HLY_MCP is an MCP server for HLY (HuiLianYi) expense report operations.
It currently supports:
- querying expense report detail
- creating expense reports
- querying companies by tenant
- querying expense reports v2 with receipt expansion
- audit-pass expense reports
- audit-reject expense reports
- local third-party info storage helpers
Package Name
The npm package name is:
@azhena/hly-mcpThe installed CLI commands are:
HLY_MCP
hly-mcpInstall
Global install:
npm install -g @azhena/hly-mcpRun directly after install:
HLY_MCPOr:
hly-mcpEnvironment Variables
Required:
HLY_BASE_URLHLY_APP_IDHLY_APP_SECRET
Optional:
HLY_TOKEN_PATHdefault:/oauth/tokenHLY_EXPENSE_DETAIL_PATHdefault:/api/open/expenseReport/detailHLY_EXPENSE_CREATE_PATHdefault:/api/open/expenseReport/createHLY_EXPENSE_REPORT_V2_PATHdefault:/api/open/expenseReport/v2HLY_EXPENSE_AUDIT_PASS_PATHdefault:/api/open/expenseReport/audit/passHLY_EXPENSE_AUDIT_REJECT_PATHdefault:/api/open/expenseReport/audit/rejectHLY_COMPANY_BY_TENANT_PATHdefault:/api/open/company/tenant/allHLY_TIMEOUT_MSdefault:30000HLY_RETRY_COUNTdefault:1HLY_CACHE_TTL_SECONDSdefault:86400HLY_EXPENSE_DETAIL_CACHE_PATHHLY_HTTP_DEBUGset to1to print HTTP request/response logs
Recommended HLY gateway base URLs:
- PROD:
https://api.huilianyi.com/gateway - STAGE:
https://apistage.huilianyi.com/gateway - SANDBOX:
https://huoshantstapi.huilianyi.com/gateway
MCP Client Config
Example MCP client config:
{
"mcpServers": {
"HLY_MCP": {
"command": "hly-mcp",
"env": {
"HLY_BASE_URL": "https://apistage.huilianyi.com/gateway",
"HLY_APP_ID": "your_app_id",
"HLY_APP_SECRET": "your_app_secret"
}
}
}
}If your client does not use global binaries, you can also run with npx:
{
"mcpServers": {
"HLY_MCP": {
"command": "npx",
"args": [
"-y",
"@azhena/hly-mcp"
],
"env": {
"HLY_BASE_URL": "https://apistage.huilianyi.com/gateway",
"HLY_APP_ID": "your_app_id",
"HLY_APP_SECRET": "your_app_secret"
}
}
}
}Local Development
Clone the project:
git clone <your-repo-url>
cd huilianyi-third-info-mcpInstall dependencies:
npm installCreate local env config:
cp .env.example .envIf you are on Windows and cp is unavailable, create .env manually and fill in:
HLY_BASE_URL=https://apistage.huilianyi.com/gateway
HLY_APP_ID=your_app_id
HLY_APP_SECRET=your_app_secretStart locally:
npm startOr run directly:
node src/index.jsUse local source in an MCP client:
{
"mcpServers": {
"HLY_MCP": {
"command": "node",
"args": [
"C:/path/to/huilianyi-third-info-mcp/src/index.js"
],
"env": {
"HLY_BASE_URL": "https://apistage.huilianyi.com/gateway",
"HLY_APP_ID": "your_app_id",
"HLY_APP_SECRET": "your_app_secret"
}
}
}
}Install dependencies:
npm installStart locally:
npm startRun tests:
npm testPreview the publish tarball:
npm packMain Tools
query_expense_report_detailcreate_expense_reportquery_companies_by_tenantquery_expense_reports_v2audit_pass_expense_reportaudit_reject_expense_reportupsert_expense_third_infoget_expense_third_info_by_business_codelist_expense_third_info_by_employeesearch_expense_third_info
Publish
Log in with your npm account:
npm loginPublish the package:
npm publish