fix: update MCP configuration path in Antigravity module

This commit is contained in:
DevelopmentCats 2025-11-21 15:52:04 -06:00
parent 43d8483518
commit 7b8f8f7bf6
3 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,7 @@ tags: [ide, antigravity, ai]
# Antigravity IDE
Add a button to open any workspace with a single click in Antigravity IDE.
Add a button to open any workspace with a single click in [Antigravity IDE](https://antigravity.google).
Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder).
@ -37,7 +37,7 @@ module "antigravity" {
### Configure MCP servers for Antigravity
Provide a JSON-encoded string via the `mcp` input. When set, the module writes the value to `~/.antigravity/mcp.json` using a `coder_script` on workspace start.
Provide a JSON-encoded string via the `mcp` input. When set, the module writes the value to `~/.gemini/antigravity/mcp_config.json` using a `coder_script` on workspace start.
The following example configures Antigravity to use the GitHub MCP server with authentication facilitated by the [`coder_external_auth`](https://coder.com/docs/admin/external-auth#configure-a-github-oauth-app) resource.

View File

@ -91,7 +91,7 @@ describe("antigravity", async () => {
expect(coder_app?.instances[0].attributes.order).toBe(22);
});
it("writes ~/.antigravity/mcp.json when mcp provided", async () => {
it("writes ~/.gemini/antigravity/mcp_config.json when mcp provided", async () => {
const id = await runContainer("alpine");
try {
const mcp = JSON.stringify({
@ -114,7 +114,7 @@ describe("antigravity", async () => {
expect(resp.exitCode).toBe(0);
const content = await readFileContainer(
id,
"/root/.antigravity/mcp.json",
"/root/.gemini/antigravity/mcp_config.json",
);
expect(content).toBe(mcp);
} finally {

View File

@ -52,7 +52,7 @@ variable "display_name" {
variable "mcp" {
type = string
description = "JSON-encoded string to configure MCP servers for Antigravity. When set, writes ~/.antigravity/mcp.json."
description = "JSON-encoded string to configure MCP servers for Antigravity. When set, writes ~/.gemini/antigravity/mcp_config.json."
default = ""
}
@ -96,9 +96,9 @@ resource "coder_script" "antigravity_mcp" {
script = <<-EOT
#!/bin/sh
set -eu
mkdir -p "$HOME/.antigravity"
echo -n "${local.mcp_b64}" | base64 -d > "$HOME/.antigravity/mcp.json"
chmod 600 "$HOME/.antigravity/mcp.json"
mkdir -p "$HOME/.gemini/antigravity"
echo -n "${local.mcp_b64}" | base64 -d > "$HOME/.gemini/antigravity/mcp_config.json"
chmod 600 "$HOME/.gemini/antigravity/mcp_config.json"
EOT
}