@arizeai/phoenix-mcp 4.0.14 → 4.0.16

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/build/client.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { createClient } from "@arizeai/phoenix-client";
2
+ import { USER_AGENT } from "./constants.js";
2
3
  /**
3
4
  * Create a Phoenix REST client for MCP tool handlers.
4
5
  *
@@ -7,6 +8,9 @@ import { createClient } from "@arizeai/phoenix-client";
7
8
  */
8
9
  export function createPhoenixClient({ config, }) {
9
10
  const headers = {
11
+ // Set an explicit User-Agent first so caller-supplied headers can override
12
+ // it. See USER_AGENT in constants.ts for why this is required (#13742).
13
+ "User-Agent": USER_AGENT,
10
14
  ...(config.headers || {}),
11
15
  };
12
16
  if (config.apiKey) {
@@ -32,3 +32,12 @@ export const ANTHROPIC_DEFAULT_MAX_TOKENS = 1000;
32
32
  export const MS_PER_MINUTE = 60_000;
33
33
  /** Provenance tag applied to dataset examples created through the MCP server. */
34
34
  export const MCP_SYNTHETIC_SOURCE = "Synthetic Example added via MCP";
35
+ /**
36
+ * User-Agent sent with Phoenix REST requests.
37
+ *
38
+ * Node's global `fetch` (undici) sends `User-Agent: undici` by default. Some
39
+ * Phoenix Cloud edges 302-redirect requests carrying that User-Agent to an HTML
40
+ * landing page, so the client receives `<!DOCTYPE html…>` and fails to parse the
41
+ * response as JSON (see #13742). Sending an explicit User-Agent avoids the redirect.
42
+ */
43
+ export const USER_AGENT = "phoenix-mcp";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-mcp",
3
- "version": "4.0.14",
3
+ "version": "4.0.16",
4
4
  "description": "A MCP server for Arize Phoenix",
5
5
  "keywords": [
6
6
  "arize-phoenix",
@@ -24,19 +24,19 @@
24
24
  ],
25
25
  "type": "module",
26
26
  "dependencies": {
27
- "@modelcontextprotocol/sdk": "^1.27.1",
27
+ "@modelcontextprotocol/sdk": "^1.29.0",
28
28
  "glob": "^13.0.6",
29
29
  "minimist": "^1.2.8",
30
- "zod": "^4.3.6",
31
- "@arizeai/phoenix-client": "6.10.1",
30
+ "zod": "^4.4.3",
31
+ "@arizeai/phoenix-client": "6.11.0",
32
32
  "@arizeai/phoenix-config": "0.1.4"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/glob": "^9.0.0",
36
36
  "@types/minimist": "^1.2.5",
37
- "@types/node": "^22.14.0",
38
- "tsx": "^4.21.0",
39
- "vitest": "^4.1.0"
37
+ "@types/node": "^25.9.4",
38
+ "tsx": "^4.22.4",
39
+ "vitest": "^4.1.9"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsc && chmod 755 build/index.js",