Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/frontend/src/controllers/API/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const URLs = {
ALL: `all`,
VOICE: `voice`,
PUBLIC_FLOW: `flows/public_flow`,
MCP: `mcp`,
MCP: `mcp/project`,
MCP_SERVERS: `mcp/servers`,
KNOWLEDGE_BASES: `knowledge_bases`,
AGENT_MARKETPLACE: `agent-marketplace`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const useAddMCPServer: useMutationFunctionType<
}

const res = await api.post(
`${getURL("MCP_SERVERS", undefined, false)}/${body.name}`,
`${getURL("MCP_SERVERS", undefined, true)}/${body.name}`,
payload,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useGetMCPServer: useMutationFunctionType<

const responseFn = async (params: IGetMCPServer) => {
const { data } = await api.get<Omit<getMCPServerResponse, "name">>(
`${getURL("MCP_SERVERS", undefined, false)}/${params.name}`,
`${getURL("MCP_SERVERS", undefined, true)}/${params.name}`,
);

return { ...data, name: params.name };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const useGetMCPServers: useQueryFunctionType<
const responseFn = async () => {
try {
const { data } = await api.get<getMCPServersResponse>(
`${getURL("MCP_SERVERS", undefined, false)}?action_count=false`,
`${getURL("MCP_SERVERS", undefined, true)}?action_count=false`,
);
// Merge with cached data to preserve non-null mode/toolsCount
const cachedData = queryClient.getQueryData(["useGetMCPServers"]) as
Expand Down Expand Up @@ -54,7 +54,7 @@ export const useGetMCPServers: useQueryFunctionType<
const fetchWithCounts = async () => {
try {
const { data } = await api.get<getMCPServersResponse>(
`${getURL("MCP_SERVERS", undefined, false)}?action_count=true`,
`${getURL("MCP_SERVERS", undefined, true)}?action_count=true`,
);
return data;
} catch (error) {
Expand Down