feat(mcp): add Pi client configuration
This commit is contained in:
1 parent
310eaa38a0
commit
d5f18034f9
6 files changed
+38
-4
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildMcpCherryStudioConfig, buildMcpCodexConfig, buildMcpJsonConfig, buildMcpOpenCodeConfig, buildMcpTraeConfig, buildMcpVsCodeConfig, mcpWebBackendUrl } from "@/lib/mcp/mcpConfigTemplates";
|
||||
import { buildMcpCherryStudioConfig, buildMcpCodexConfig, buildMcpJsonConfig, buildMcpOpenCodeConfig, buildMcpPiConfig, buildMcpTraeConfig, buildMcpVsCodeConfig, mcpWebBackendUrl } from "@/lib/mcp/mcpConfigTemplates";
|
||||
|
||||
describe("MCP config templates", () => {
|
||||
it("builds the standard mcpServers JSON used by Claude, Cursor, TRAE, and Windsurf", () => {
|
||||
@@ -14,6 +14,17 @@ describe("MCP config templates", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("builds the standard mcpServers JSON used by the Pi agent", () => {
|
||||
expect(JSON.parse(buildMcpPiConfig())).toEqual({
|
||||
mcpServers: {
|
||||
dbx: {
|
||||
command: "dbx-mcp-server",
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(buildMcpPiConfig({ command: "npx", args: ["-y", "@dbx-app/mcp-server"] })).toContain('"npx"');
|
||||
});
|
||||
|
||||
it("builds standard JSON configs with a direct node launch command", () => {
|
||||
const config = JSON.parse(buildMcpJsonConfig({ command: "C:\\Program Files\\nodejs\\node.exe", args: ["C:\\Users\\zhiyo\\AppData\\Roaming\\npm\\node_modules\\@dbx-app\\mcp-server\\dist\\index.js"] }));
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ describe("MCP policy settings state", () => {
|
||||
expect(tabsSource).toContain("overscroll-x-contain");
|
||||
expect(tabsSource).not.toContain("flex-wrap");
|
||||
expect(tabsSource).not.toContain("grid-cols-");
|
||||
expect(tabsSource.match(/flex-none shrink-0/g)).toHaveLength(8);
|
||||
expect(tabsSource.match(/flex-none shrink-0/g)).toHaveLength(9);
|
||||
expect(tabsSource).not.toContain("min-w-0 px-");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -98,3 +98,7 @@ export function buildMcpOpenCodeConfig(config?: McpLaunchConfig): string {
|
||||
|
||||
return JSON.stringify({ mcp: { dbx } }, null, 2);
|
||||
}
|
||||
|
||||
export function buildMcpPiConfig(config?: McpLaunchConfig): string {
|
||||
return buildMcpJsonConfig(config);
|
||||
}
|
||||
Reference in new issue
Block a user