@arizeai/phoenix-mcp 2.1.7 → 2.1.9

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
@@ -19,6 +19,7 @@ Phoenix MCP Server is an implementation of the Model Context Protocol for the Ar
19
19
 
20
20
  You can use Phoenix MCP Server for:
21
21
 
22
+ - **Projects Management**: List and explore projects that organize your observability data
22
23
  - **Prompts Management**: Create, list, update, and iterate on prompts
23
24
  - **Datasets**: Explore datasets, and syntesize new examples
24
25
  - **Experiments**: Pull experiment results and visualize them with the help of an LLM
package/build/index.js CHANGED
@@ -7,16 +7,20 @@ import minimist from "minimist";
7
7
  import { initializeDatasetTools } from "./datasetTools.js";
8
8
  import { initializeExperimentTools } from "./experimentTools.js";
9
9
  import { initializePromptTools } from "./promptTools.js";
10
+ import { initializeProjectTools } from "./projectTools.js";
10
11
  import { initializeReadmeResources } from "./readmeResource.js";
11
12
  const argv = minimist(process.argv.slice(2));
13
+ const headers = argv.apiKey
14
+ ? {
15
+ Authorization: `Bearer ${argv.apiKey}`,
16
+ api_key: argv.apiKey, // For hosted phoenix
17
+ }
18
+ : {};
12
19
  // Initialize Phoenix client
13
20
  const client = createClient({
14
21
  options: {
15
22
  baseUrl: argv.baseUrl || "http://localhost:6006",
16
- headers: {
17
- Authorization: `Bearer ${argv.apiKey}`,
18
- api_key: argv.apiKey, // For hosted phoenix
19
- },
23
+ headers,
20
24
  },
21
25
  });
22
26
  // Create server instance
@@ -31,6 +35,7 @@ const server = new McpServer({
31
35
  initializePromptTools({ client, server });
32
36
  initializeExperimentTools({ client, server });
33
37
  initializeDatasetTools({ client, server });
38
+ initializeProjectTools({ client, server });
34
39
  async function main() {
35
40
  // Initialize readme resources first
36
41
  if (process.env.DANGEROUSLY_READ_README_FILES === "true") {
@@ -0,0 +1,48 @@
1
+ import z from "zod";
2
+ const LIST_PROJECTS_DESCRIPTION = `Get a list of all projects.
3
+
4
+ Projects are containers for organizing traces, spans, and other observability data.
5
+ Each project has a unique name and can contain traces from different applications or experiments.
6
+
7
+ Example usage:
8
+ Show me all available projects
9
+
10
+ Expected return:
11
+ Array of project objects with metadata.
12
+ Example: [
13
+ {
14
+ "id": "UHJvamVjdDox",
15
+ "name": "default",
16
+ "description": "Default project for traces"
17
+ },
18
+ {
19
+ "id": "UHJvamVjdDoy",
20
+ "name": "my-experiment",
21
+ "description": "Project for my ML experiment"
22
+ }
23
+ ]`;
24
+ export const initializeProjectTools = ({ client, server, }) => {
25
+ server.tool("list-projects", LIST_PROJECTS_DESCRIPTION, {
26
+ limit: z.number().min(1).max(100).default(100).optional(),
27
+ cursor: z.string().optional(),
28
+ includeExperimentProjects: z.boolean().default(false).optional(),
29
+ }, async ({ limit = 100, cursor, includeExperimentProjects = false }) => {
30
+ const response = await client.GET("/v1/projects", {
31
+ params: {
32
+ query: {
33
+ limit,
34
+ cursor,
35
+ include_experiment_projects: includeExperimentProjects,
36
+ },
37
+ },
38
+ });
39
+ return {
40
+ content: [
41
+ {
42
+ type: "text",
43
+ text: JSON.stringify(response.data?.data, null, 2),
44
+ },
45
+ ],
46
+ };
47
+ });
48
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-mcp",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "A MCP server for Arize Phoenix",
5
5
  "bin": {
6
6
  "@arizeai/phoenix-mcp": "./build/index.js"
@@ -16,11 +16,11 @@
16
16
  "author": "oss@arize.com",
17
17
  "license": "Apache-2.0",
18
18
  "dependencies": {
19
- "@modelcontextprotocol/sdk": "^1.8.0",
19
+ "@modelcontextprotocol/sdk": "^1.12.0",
20
20
  "glob": "^11.0.1",
21
21
  "minimist": "^1.2.8",
22
22
  "zod": "^3.24.2",
23
- "@arizeai/phoenix-client": "2.0.1"
23
+ "@arizeai/phoenix-client": "2.1.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/glob": "^8.1.0",