fix(admin): use serverUrl in Antigravity direct HTTP connection config

This commit is contained in:
John Smith
2026-09-02 13:19:53 -04:00
parent bd56ed2cd2
commit 74f87902bd
3 changed files with 22 additions and 3 deletions
+5
View File
@@ -1348,6 +1348,10 @@
var servers = {};
if ( variant === 'npx' ) { servers[ key ] = Object.assign( { type: 'stdio' }, npx ); return { mcpServers: servers }; }
if ( variant === 'http' ) { servers[ key ] = http; return { mcpServers: servers }; }
if ( variant === 'antigravity-http' ) {
servers[ key ] = { serverUrl: c.endpoint, headers: { Authorization: 'Basic ' + c.b64 } };
return { mcpServers: servers };
}
if ( variant === 'remote' ) {
servers[ key ] = { command: 'npx', args: [ '-y', 'mcp-remote', c.endpoint, '--header', 'Authorization: Basic ' + c.b64 ] };
return { mcpServers: servers };
@@ -1592,6 +1596,7 @@
else if ( variant === 'openclaw-npx' ) { html += emcpCopyBlock( 'Manual config — Node proxy / npx (openclaw.json)', emcpOpenclawConfig( 'npx' ) ); }
else if ( variant === 'hermes-http' ) { html += emcpCopyBlock( 'Manual config — direct HTTP (config.yaml)', emcpHermesConfig( 'http' ) ); }
else if ( variant === 'hermes-npx' ) { html += emcpCopyBlock( 'Manual config — Node proxy / npx (config.yaml)', emcpHermesConfig( 'npx' ) ); }
else if ( variant === 'antigravity-http' ) { html += emcpCopyBlock( 'Manual config — direct HTTP (mcp_config.json)', JSON.stringify( emcpJsonConfig( 'antigravity-http' ), null, 4 ) ); }
else {
var label = variant === 'npx' ? 'Manual config — Node proxy (npx)'
: variant === 'http' ? 'Manual config — direct HTTP'
+5 -3
View File
@@ -4116,8 +4116,10 @@ class EMCP_Tools_Admin {
'type' => 'config',
'lang' => 'json',
'paths' => array(
array( 'path' => '~/.gemini/antigravity/mcp_config.json', 'label' => __( 'macOS / Linux', 'emcp-tools' ) ),
array( 'path' => '%USERPROFILE%\\.gemini\\antigravity\\mcp_config.json', 'label' => __( 'Windows', 'emcp-tools' ) ),
array( 'path' => '~/.gemini/config/mcp_config.json', 'label' => __( 'macOS / Linux (CLI)', 'emcp-tools' ) ),
array( 'path' => '~/.gemini/antigravity/mcp_config.json', 'label' => __( 'macOS / Linux (IDE)', 'emcp-tools' ) ),
array( 'path' => '%USERPROFILE%\\.gemini\\config\\mcp_config.json', 'label' => __( 'Windows (CLI)', 'emcp-tools' ) ),
array( 'path' => '%USERPROFILE%\\.gemini\\antigravity\\mcp_config.json', 'label' => __( 'Windows (IDE)', 'emcp-tools' ) ),
),
'template' => "{\n \"mcpServers\": {\n \"%NAME%\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"mcp-remote\",\n \"%ENDPOINT%\"\n ]\n }\n }\n}",
);
@@ -4213,7 +4215,7 @@ class EMCP_Tools_Admin {
'label' => __( 'Antigravity', 'emcp-tools' ),
'icon' => 'editor-code',
'image' => 'antigravity.png',
'methods' => array( 'bundle' => false, 'cli' => null, 'ai_prompt' => false, 'json' => array( 'http' ) ),
'methods' => array( 'bundle' => false, 'cli' => null, 'ai_prompt' => false, 'json' => array( 'antigravity-http' ) ),
'oauth' => $oauth_antigravity,
),
array(
+12
View File
@@ -110,6 +110,18 @@
}
},
"antigravity_direct_http": {
"_description": "Antigravity (IDE / CLI) — direct HTTP connection (add to ~/.gemini/config/mcp_config.json or ~/.gemini/antigravity/mcp_config.json)",
"mcpServers": {
"emcp-tools": {
"serverUrl": "https://your-site.com/wp-json/mcp/emcp-tools-server",
"headers": {
"Authorization": "Basic BASE64_OF_USERNAME:APP_PASSWORD"
}
}
}
},
"mcp_inspector_wpcli": {
"_description": "MCP Inspector — test and debug tools via WP-CLI",
"_command": "npx @modelcontextprotocol/inspector wp mcp-adapter serve --server=emcp-tools-server --user=admin --path=/path/to/wordpress"