@arizeai/phoenix-mcp 4.2.8 → 4.3.1

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
@@ -104,7 +104,7 @@ pnpm inspect
104
104
  When developing, the server requires the following environment variables:
105
105
 
106
106
  - `PHOENIX_API_KEY`: Your Phoenix API key
107
- - `PHOENIX_HOST`: The base URL for Phoenix
107
+ - `PHOENIX_ENDPOINT`: The base URL for Phoenix
108
108
  - `PHOENIX_PROJECT`: Optional default project for project-scoped tools (alias: `PHOENIX_PROJECT_NAME`)
109
109
  - `PHOENIX_CLIENT_HEADERS`: Optional JSON-encoded request headers
110
110
 
@@ -112,8 +112,8 @@ Make sure to set these in a `.env` file. See `.env.example`.
112
112
 
113
113
  At runtime the server also discovers the nearest `.env.phoenix` file at or
114
114
  above the working directory. Process environment variables and command-line
115
- options take precedence. If a higher-priority API key is paired with
116
- `PHOENIX_HOST` from the file, the server warns once and continues. Set
115
+ options take precedence. If a higher-priority API key is paired with an
116
+ endpoint from the file, the server warns once and continues. Set
117
117
  `PHOENIX_DISCOVER_CONFIG=false` to disable discovery.
118
118
 
119
119
  ## Tool Coverage
package/build/config.js CHANGED
@@ -1,11 +1,13 @@
1
- import { DEFAULT_PHOENIX_BASE_URL, ENV_PHOENIX_HOST, getCredentialsFromEnvironmentWithSource, getProjectFromEnvironment, getStrFromEnvironmentWithSource, warnIfUsingFileEndpointWithCredentials, } from "@arizeai/phoenix-config";
1
+ import { DEFAULT_PHOENIX_BASE_URL, ENV_PHOENIX_ENDPOINT, getBaseUrlFromEnvironmentWithSource, getCredentialsFromEnvironmentWithSource, getProjectFromEnvironment, warnIfUsingFileEndpointWithCredentials, } from "@arizeai/phoenix-config";
2
2
  export const DEFAULT_PHOENIX_ENDPOINT = DEFAULT_PHOENIX_BASE_URL;
3
3
  /** Load Phoenix MCP configuration from environment variables. */
4
4
  export function loadConfigFromEnvironment() {
5
5
  return loadConfigFromEnvironmentWithSources().config;
6
6
  }
7
7
  function loadConfigFromEnvironmentWithSources() {
8
- const baseUrl = getStrFromEnvironmentWithSource(ENV_PHOENIX_HOST);
8
+ // PHOENIX_ENDPOINT (canonical for API access) first, inferring from the
9
+ // trace-export variables when only those are set, then legacy PHOENIX_HOST.
10
+ const baseUrl = getBaseUrlFromEnvironmentWithSource();
9
11
  const { apiKey, headers, source: credentialSource, } = getCredentialsFromEnvironmentWithSource();
10
12
  const project = getProjectFromEnvironment();
11
13
  return {
@@ -17,6 +19,7 @@ function loadConfigFromEnvironmentWithSources() {
17
19
  },
18
20
  credentialSource,
19
21
  endpointSource: baseUrl.source,
22
+ endpointVariable: baseUrl.envKey,
20
23
  };
21
24
  }
22
25
  /**
@@ -43,7 +46,7 @@ function getStringCommandLineOptions(commandLineOptions) {
43
46
  * parsed by `minimist` do not replace valid environment defaults with boolean `true`.
44
47
  */
45
48
  export function resolveConfig({ commandLineOptions, }) {
46
- const { config: envConfig, credentialSource, endpointSource, } = loadConfigFromEnvironmentWithSources();
49
+ const { config: envConfig, credentialSource, endpointSource, endpointVariable, } = loadConfigFromEnvironmentWithSources();
47
50
  const commandLineConfig = getStringCommandLineOptions(commandLineOptions);
48
51
  const usesFileEndpoint = endpointSource?.kind === "env-file" &&
49
52
  commandLineConfig.baseUrl === undefined;
@@ -56,7 +59,7 @@ export function resolveConfig({ commandLineOptions, }) {
56
59
  warnIfUsingFileEndpointWithCredentials({
57
60
  credentialSource: resolvedCredentialSource,
58
61
  endpointSource,
59
- endpointVariable: ENV_PHOENIX_HOST,
62
+ endpointVariable: endpointVariable ?? ENV_PHOENIX_ENDPOINT,
60
63
  });
61
64
  }
62
65
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-mcp",
3
- "version": "4.2.8",
3
+ "version": "4.3.1",
4
4
  "description": "A MCP server for Arize Phoenix",
5
5
  "keywords": [
6
6
  "arize-phoenix",
@@ -28,19 +28,19 @@
28
28
  "glob": "^13.0.6",
29
29
  "minimist": "^1.2.8",
30
30
  "zod": "^4.4.3",
31
- "@arizeai/phoenix-client": "7.2.0",
32
- "@arizeai/phoenix-config": "0.4.0"
31
+ "@arizeai/phoenix-client": "7.3.1",
32
+ "@arizeai/phoenix-config": "0.5.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/glob": "^9.0.0",
36
36
  "@types/minimist": "^1.2.5",
37
- "@types/node": "^26.1.2",
38
- "tsx": "^4.23.1",
37
+ "@types/node": "^26.2.0",
38
+ "tsx": "^4.23.11",
39
39
  "vitest": "^4.1.10"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsc && chmod 755 build/index.js",
43
- "dev": "source ./.env && tsx src/index.ts -- --apiKey $PHOENIX_API_KEY --baseUrl $PHOENIX_BASE_URL",
43
+ "dev": "source ./.env && tsx src/index.ts -- --apiKey $PHOENIX_API_KEY --baseUrl $PHOENIX_ENDPOINT",
44
44
  "inspect": "pnpm run build && npx -y @modelcontextprotocol/inspector -- node build/index.js",
45
45
  "test": "vitest run",
46
46
  "typecheck": "tsc --noEmit"