@teamnetwork-nz/payhero-mcp-server 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A Model Context Protocol server for the [PayHero API](https://developer.payhero.co.nz/guide). It follows the same Node/TypeScript shape as the neighbouring TEAMnetwork MCP servers and supports stdio plus stateless Streamable HTTP.
4
4
 
5
+ Tools accept optional `outputFormat: "json"`. Results are already returned as JSON text; the option is accepted and removed locally before calling the PayHero API.
6
+
5
7
  ## What it exposes
6
8
 
7
9
  The official API currently supports:
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import { makeTools } from './tools.js';
7
7
  import { createHttpServer } from './http-server.js';
8
8
  import { parsePositiveInt } from './env.js';
9
9
  import { packageName, packageVersion } from './package-info.js';
10
+ import { z } from 'zod/v3';
10
11
  const config = loadConfig();
11
12
  const client = new PayHeroClient(config);
12
13
  const tools = makeTools(client, config.readWrite);
@@ -15,7 +16,7 @@ const factory = () => {
15
16
  instructions: 'PayHero payroll API MCP. Read-only by default. Call payhero_connect first to verify authentication/company selection. Dates use PayHero formats documented per endpoint. Write tools appear only when PAYHERO_READWRITE=true. Employee pay/bank/tax and payroll data are sensitive; disclose minimally.',
16
17
  });
17
18
  for (const tool of tools) {
18
- server.registerTool(tool.name, { description: tool.description, inputSchema: tool.inputSchema.strict() }, async (args) => {
19
+ server.registerTool(tool.name, { description: tool.description, inputSchema: tool.inputSchema.extend({ outputFormat: z.enum(['json']).optional().describe('Return valid JSON text.') }).strict() }, async ({ outputFormat: _outputFormat, ...args }) => {
19
20
  try {
20
21
  const result = await tool.handler(args);
21
22
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnetwork-nz/payhero-mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server for the PayHero payroll API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",