mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-24 02:39:19 -05:00
Compare commits
3 Commits
v0.11.8
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c76c7c9be7 | ||
|
|
2378d849b8 | ||
|
|
98960c5d0f |
@@ -126,14 +126,10 @@ export const updatePromptDescription = async (
|
|||||||
): Promise<{ success: boolean; error?: string }> => {
|
): Promise<{ success: boolean; error?: string }> => {
|
||||||
try {
|
try {
|
||||||
// URL-encode server and prompt names to handle slashes (e.g., "com.atlassian/atlassian-mcp-server")
|
// URL-encode server and prompt names to handle slashes (e.g., "com.atlassian/atlassian-mcp-server")
|
||||||
|
// Auth header is automatically added by the interceptor
|
||||||
const response = await apiPut<any>(
|
const response = await apiPut<any>(
|
||||||
`/servers/${encodeURIComponent(serverName)}/prompts/${encodeURIComponent(promptName)}/description`,
|
`/servers/${encodeURIComponent(serverName)}/prompts/${encodeURIComponent(promptName)}/description`,
|
||||||
{ description },
|
{ description },
|
||||||
{
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${localStorage.getItem('mcphub_token')}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -30,11 +30,8 @@ export const callTool = async (
|
|||||||
? `/tools/${encodeURIComponent(server)}/${encodeURIComponent(request.toolName)}`
|
? `/tools/${encodeURIComponent(server)}/${encodeURIComponent(request.toolName)}`
|
||||||
: '/tools/call';
|
: '/tools/call';
|
||||||
|
|
||||||
const response = await apiPost<any>(url, request.arguments, {
|
// Auth header is automatically added by the interceptor
|
||||||
headers: {
|
const response = await apiPost<any>(url, request.arguments);
|
||||||
Authorization: `Bearer ${localStorage.getItem('mcphub_token')}`, // Add bearer auth for MCP routing
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (response.success === false) {
|
if (response.success === false) {
|
||||||
return {
|
return {
|
||||||
@@ -66,14 +63,10 @@ export const toggleTool = async (
|
|||||||
): Promise<{ success: boolean; error?: string }> => {
|
): Promise<{ success: boolean; error?: string }> => {
|
||||||
try {
|
try {
|
||||||
// URL-encode server and tool names to handle slashes (e.g., "com.atlassian/atlassian-mcp-server")
|
// URL-encode server and tool names to handle slashes (e.g., "com.atlassian/atlassian-mcp-server")
|
||||||
|
// Auth header is automatically added by the interceptor
|
||||||
const response = await apiPost<any>(
|
const response = await apiPost<any>(
|
||||||
`/servers/${encodeURIComponent(serverName)}/tools/${encodeURIComponent(toolName)}/toggle`,
|
`/servers/${encodeURIComponent(serverName)}/tools/${encodeURIComponent(toolName)}/toggle`,
|
||||||
{ enabled },
|
{ enabled },
|
||||||
{
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${localStorage.getItem('mcphub_token')}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -99,14 +92,10 @@ export const updateToolDescription = async (
|
|||||||
): Promise<{ success: boolean; error?: string }> => {
|
): Promise<{ success: boolean; error?: string }> => {
|
||||||
try {
|
try {
|
||||||
// URL-encode server and tool names to handle slashes (e.g., "com.atlassian/atlassian-mcp-server")
|
// URL-encode server and tool names to handle slashes (e.g., "com.atlassian/atlassian-mcp-server")
|
||||||
|
// Auth header is automatically added by the interceptor
|
||||||
const response = await apiPut<any>(
|
const response = await apiPut<any>(
|
||||||
`/servers/${encodeURIComponent(serverName)}/tools/${encodeURIComponent(toolName)}/description`,
|
`/servers/${encodeURIComponent(serverName)}/tools/${encodeURIComponent(toolName)}/description`,
|
||||||
{ description },
|
{ description },
|
||||||
{
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${localStorage.getItem('mcphub_token')}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -8,6 +8,12 @@
|
|||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"AMAP_MAPS_API_KEY": "your-api-key"
|
"AMAP_MAPS_API_KEY": "your-api-key"
|
||||||
|
},
|
||||||
|
"tools": {
|
||||||
|
"amap-maps_regeocode": {
|
||||||
|
"enabled": true,
|
||||||
|
"description": "Updated via UI test"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"playwright": {
|
"playwright": {
|
||||||
|
|||||||
Reference in New Issue
Block a user