@teamnetwork-nz/teamlink-mcp-server 0.6.5 → 0.6.7

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -5
  2. package/package.json +34 -34
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { dirname, join } from 'node:path';
6
6
  import axios from 'axios';
7
- import { z } from 'zod';
7
+ import { z } from 'zod/v3';
8
8
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
9
9
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
10
10
  import { createHttpServer } from './http-server.js';
@@ -209,7 +209,7 @@ strictTool('crm_search_contacts', 'Search contacts. `cscId` is canonical for CSC
209
209
  role: z.string().optional().describe(roleDescription),
210
210
  page: z.number().optional(), pageSize: z.number().optional(),
211
211
  }, async (args) => get('/contacts/search', args));
212
- strictTool('crm_get_contact', 'Get one contact by id. Response includes `role` (CSCClass) and `typeFlags` (contact type, distinct from role), `homeAccountId` (the CSAID this contact belongs to), and `isActive` — sourced from the CSPivotContactAccount pivot (CSPCA_Active), NOT the legacy/unused CSCActive column. An inactive contact may still be returned for historical/reporting purposes. If the calling key is Admin-scoped, the response also includes `password` (CSCPassword, the legacy plaintext web-app password) — omitted entirely for every other role; not returned by crm_search_contacts.', { contactId: z.number() }, async ({ contactId }) => get(`/contacts/${contactId}`));
212
+ strictTool('crm_get_contact', 'Get one contact by id. Response includes `role` (CSCClass) and `typeFlags` (contact type, distinct from role), `homeAccountId` (the CSAID this contact belongs to), and `isActive` — sourced from the CSPivotContactAccount pivot (CSPCA_Active), NOT the legacy/unused CSCActive column. An inactive contact may still be returned for historical/reporting purposes. Credentials are never returned.', { contactId: z.number() }, async ({ contactId }) => get(`/contacts/${contactId}`));
213
213
  if (READWRITE) {
214
214
  strictTool('crm_create_contact', 'Create a contact under an account (also creates the active account link). Role is gated by a staff ' +
215
215
  'hierarchy (A > M > E > {S,T,P} > C): the calling key\'s own role must outrank the role being assigned, ' +
@@ -223,9 +223,8 @@ if (READWRITE) {
223
223
  strictTool('crm_update_contact', 'Update a contact. `active` sets CSPivotContactAccount.CSPCA_Active for the account context (the legacy ' +
224
224
  'CSCActive column is never written). Both the contact\'s CURRENT role and the role being set to are gated ' +
225
225
  'by the same staff hierarchy as crm_create_contact (A > M > E > {S,T,P} > C, Admin unrestricted) — the call ' +
226
- '403s (role_hierarchy_violation) if the calling key cannot manage either one. Password is not settable via ' +
227
- 'this tool (not exposed in this schema); the REST API additionally caps password writes to Admin-outranks-target ' +
228
- 'and enforces 8-15 chars with upper/lower/digit.', {
226
+ '403s (role_hierarchy_violation) if the calling key cannot manage either one. Credentials are not settable ' +
227
+ 'through contact tools or endpoints.', {
229
228
  contactId: z.number(), firstName: z.string(), lastName: z.string(), email: z.string(), mobile: z.string().optional(),
230
229
  role: z.string().optional().describe(roleDescription),
231
230
  active: z.boolean().optional().describe('Sets CSPCA_Active (pivot) for the account context, not CSCActive.'),
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "@teamnetwork-nz/teamlink-mcp-server",
3
- "version": "0.6.5",
4
- "private": false,
5
- "description": "MCP server exposing TEAMlink REST API tools over stdio and Streamable HTTP",
6
- "main": "dist/index.js",
7
- "type": "module",
8
- "bin": {
9
- "teamlink-mcp-server": "dist/index.js"
10
- },
11
- "files": [
12
- "dist"
13
- ],
14
- "scripts": {
15
- "build": "tsc",
16
- "test": "npm run build && node --test tests/*.test.mjs",
17
- "start": "node dist/index.js",
18
- "dev": "tsc --watch",
19
- "typecheck": "tsc --noEmit"
20
- },
21
- "dependencies": {
22
- "@modelcontextprotocol/sdk": "^1.29.0",
23
- "axios": "^1.4.0",
24
- "dotenv": "^16.0.3",
25
- "zod": "^3.25.0"
26
- },
27
- "devDependencies": {
28
- "@types/node": "^20.4.2",
29
- "typescript": "^5.9.3"
30
- },
31
- "engines": {
32
- "node": ">=20"
33
- }
34
- }
1
+ {
2
+ "name": "@teamnetwork-nz/teamlink-mcp-server",
3
+ "version": "0.6.7",
4
+ "private": false,
5
+ "description": "MCP server exposing TEAMlink REST API tools over stdio and Streamable HTTP",
6
+ "main": "dist/index.js",
7
+ "type": "module",
8
+ "bin": {
9
+ "teamlink-mcp-server": "dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "test": "npm run build && node --test tests/*.test.mjs",
17
+ "start": "node dist/index.js",
18
+ "dev": "tsc --watch",
19
+ "typecheck": "tsc --noEmit"
20
+ },
21
+ "dependencies": {
22
+ "@modelcontextprotocol/sdk": "^1.32.2",
23
+ "axios": "^1.4.0",
24
+ "dotenv": "^16.0.3",
25
+ "zod": "^4.6.7"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^20.4.2",
29
+ "typescript": "^5.9.3"
30
+ },
31
+ "engines": {
32
+ "node": ">=20"
33
+ }
34
+ }