@hapticpaper/mcp-server 1.0.4 → 1.0.5

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/dist/index.js CHANGED
@@ -115,6 +115,12 @@ ${widgetJs}
115
115
  const client = new HireHumanClient({
116
116
  baseUrl: process.env.API_URL || 'https://hapticpaper.com/api/v1',
117
117
  tokenProvider: async () => {
118
+ // 1. Check for API key (CI/headless mode)
119
+ const apiKey = process.env.HAPTIC_API_KEY;
120
+ if (apiKey) {
121
+ return apiKey;
122
+ }
123
+ // 2. Check for stored OAuth tokens
118
124
  const tokens = await tokenManager.loadTokens();
119
125
  if (tokens?.access_token) {
120
126
  // Check if token is expired (with 5 min buffer)
@@ -124,7 +130,7 @@ ${widgetJs}
124
130
  }
125
131
  return tokens.access_token;
126
132
  }
127
- // No token - auto-trigger OAuth
133
+ // 3. No token - auto-trigger OAuth
128
134
  return runOAuthFlow();
129
135
  }
130
136
  });
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@hapticpaper/mcp-server",
3
- "version": "1.0.4",
3
+ "mcpName": "com.hapticpaper/mcp",
4
+ "version": "1.0.5",
4
5
  "description": "Official MCP Server for Haptic Paper - Connect your account to AI models",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
@@ -13,6 +14,7 @@
13
14
  },
14
15
  "files": [
15
16
  "dist",
17
+ "server.json",
16
18
  "README.md"
17
19
  ],
18
20
  "scripts": {
package/server.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "com.hapticpaper/mcp",
4
+ "title": "Haptic Paper",
5
+ "description": "Connect your AI to human workers. When AI needs help, Haptic Paper makes it happen - from data labeling to physical tasks.",
6
+ "icons": [
7
+ {
8
+ "mimeType": "image/png",
9
+ "sizes": ["32x32"],
10
+ "src": "https://hapticpaper.com/favicon-32x32.png"
11
+ },
12
+ {
13
+ "mimeType": "image/png",
14
+ "sizes": ["192x192"],
15
+ "src": "https://hapticpaper.com/android-chrome-192x192.png"
16
+ }
17
+ ],
18
+ "repository": {
19
+ "url": "https://github.com/hapticpaper/hh",
20
+ "source": "github",
21
+ "subfolder": "packages/mcp-server"
22
+ },
23
+ "websiteUrl": "https://hapticpaper.com/developer",
24
+ "version": "1.0.4",
25
+ "packages": [
26
+ {
27
+ "registryType": "npm",
28
+ "registryBaseUrl": "https://registry.npmjs.org",
29
+ "identifier": "@hapticpaper/mcp-server",
30
+ "version": "1.0.4",
31
+ "transport": {
32
+ "type": "stdio"
33
+ },
34
+ "runtimeHint": "npx",
35
+ "runtimeArguments": [],
36
+ "environmentVariables": [
37
+ {
38
+ "name": "HAPTIC_API_KEY",
39
+ "description": "Your Haptic Paper API key. Generate one at https://hapticpaper.com/developer",
40
+ "format": "string",
41
+ "isRequired": false,
42
+ "isSecret": true
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ }