tempo-api-mcp 2.0.1 → 2.0.2

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/bundle.js CHANGED
@@ -30119,14 +30119,23 @@ import { fileURLToPath } from "url";
30119
30119
  try {
30120
30120
  const { config: config2 } = await import("dotenv");
30121
30121
  const __dirname = dirname(fileURLToPath(import.meta.url));
30122
- config2({ path: join(__dirname, "..", ".env"), override: false });
30122
+ config2({ path: join(__dirname, "..", ".env"), override: false, quiet: true });
30123
30123
  } catch {
30124
30124
  }
30125
+ function readVar(key) {
30126
+ const raw = process.env[key];
30127
+ if (typeof raw !== "string") return void 0;
30128
+ const trimmed = raw.trim();
30129
+ if (trimmed.length === 0) return void 0;
30130
+ if (trimmed === "undefined" || trimmed === "null") return void 0;
30131
+ if (/^\$\{[^}]*\}$/.test(trimmed)) return void 0;
30132
+ return trimmed;
30133
+ }
30125
30134
  var BASE_URL = "https://api.tempo.io";
30126
30135
  var TempoClient = class {
30127
30136
  apiToken;
30128
30137
  constructor() {
30129
- const token = process.env.TEMPO_API_TOKEN;
30138
+ const token = readVar("TEMPO_API_TOKEN");
30130
30139
  if (!token) throw new Error("TEMPO_API_TOKEN environment variable is required");
30131
30140
  this.apiToken = token;
30132
30141
  }
@@ -30851,7 +30860,7 @@ function register5(server2, client2) {
30851
30860
  // src/index.ts
30852
30861
  var client = new TempoClient();
30853
30862
  var server = new McpServer(
30854
- { name: "tempo-api-mcp", version: "2.0.1" }
30863
+ { name: "tempo-api-mcp", version: "2.0.2" }
30855
30864
  );
30856
30865
  register(server, client);
30857
30866
  register2(server, client);
package/dist/client.js CHANGED
@@ -4,16 +4,34 @@ import { fileURLToPath } from 'url';
4
4
  try {
5
5
  const { config } = await import('dotenv');
6
6
  const __dirname = dirname(fileURLToPath(import.meta.url));
7
- config({ path: join(__dirname, '..', '.env'), override: false });
7
+ config({ path: join(__dirname, '..', '.env'), override: false, quiet: true });
8
8
  }
9
9
  catch {
10
10
  // not available — rely on process.env (mcpb sets credentials via mcp_config.env)
11
11
  }
12
+ /**
13
+ * Read an env var, trim whitespace, and treat as unset if blank or if the value
14
+ * looks like an unsubstituted shell placeholder (e.g. `${FOO}`) — defends
15
+ * against MCP hosts that pass .mcp.json env blocks through unexpanded.
16
+ */
17
+ function readVar(key) {
18
+ const raw = process.env[key];
19
+ if (typeof raw !== 'string')
20
+ return undefined;
21
+ const trimmed = raw.trim();
22
+ if (trimmed.length === 0)
23
+ return undefined;
24
+ if (trimmed === 'undefined' || trimmed === 'null')
25
+ return undefined;
26
+ if (/^\$\{[^}]*\}$/.test(trimmed))
27
+ return undefined;
28
+ return trimmed;
29
+ }
12
30
  const BASE_URL = 'https://api.tempo.io';
13
31
  export class TempoClient {
14
32
  apiToken;
15
33
  constructor() {
16
- const token = process.env.TEMPO_API_TOKEN;
34
+ const token = readVar('TEMPO_API_TOKEN');
17
35
  if (!token)
18
36
  throw new Error('TEMPO_API_TOKEN environment variable is required');
19
37
  this.apiToken = token;
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { register as registerTeams } from './tools/teams.js';
8
8
  import { register as registerAccounts } from './tools/accounts.js';
9
9
  import { register as registerProjects } from './tools/projects.js';
10
10
  const client = new TempoClient();
11
- const server = new McpServer({ name: 'tempo-api-mcp', version: '2.0.1' });
11
+ const server = new McpServer({ name: 'tempo-api-mcp', version: '2.0.2' });
12
12
  registerWorklogs(server, client);
13
13
  registerPlans(server, client);
14
14
  registerTeams(server, client);
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "tempo-api-mcp",
3
- "version": "2.0.1",
4
- "description": "Tempo API MCP server for Claude — developed and maintained by AI (Claude Sonnet 4.6)",
5
- "author": "Claude Sonnet 4.6 (AI) <https://www.anthropic.com/claude>",
3
+ "version": "2.0.2",
4
+ "mcpName": "io.github.chrischall/tempo-api-mcp",
5
+ "description": "Tempo API MCP server for Claude developed and maintained by AI (Claude Code)",
6
+ "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/chrischall/tempo-api-mcp.git"
@@ -13,7 +14,8 @@
13
14
  },
14
15
  "files": [
15
16
  "dist",
16
- "SKILL.md"
17
+ "SKILL.md",
18
+ "server.json"
17
19
  ],
18
20
  "scripts": {
19
21
  "build": "tsc && npm run bundle",
package/server.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.chrischall/tempo-api-mcp",
4
+ "description": "Tempo time-tracking for Claude — worklogs, plans, and timesheet approvals",
5
+ "repository": {
6
+ "url": "https://github.com/chrischall/tempo-api-mcp",
7
+ "source": "github"
8
+ },
9
+ "version": "2.0.2",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "tempo-api-mcp",
14
+ "version": "2.0.2",
15
+ "transport": {
16
+ "type": "stdio"
17
+ },
18
+ "environmentVariables": [
19
+ {
20
+ "name": "TEMPO_API_TOKEN",
21
+ "description": "Your Tempo API token (Settings → API integration in your Tempo workspace)",
22
+ "isRequired": true,
23
+ "format": "string",
24
+ "isSecret": true
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }