How to Connect Antigravity to Obsidian MCP and Fix npm E404 Errors

Published: by Isaac Lee

If you want Antigravity to read and search your Obsidian notes directly, connecting an Obsidian MCP server is the fastest path. The problem is that many people hit npm E404 or calling "initialize": EOF before the server ever comes online.

This guide focuses only on the fixes that matter in practice. The two critical points are the correct npm package name and the shift from separate host and port variables to OBSIDIAN_BASE_URL.

You can follow the steps below without a thumbnail or extra screenshots because the final JSON example and troubleshooting checklist are included inline.

Table of Contents
Advertisement

What to verify before connecting Antigravity to Obsidian MCP

antigravity obsidian mcp setup guide
How to Connect Antigravity to Obsidian MCP and Fix npm E404 Errors 2

1. Check your Obsidian Local REST API status first

Open the Local REST API plugin settings in Obsidian and confirm both the active server URL and your API key. In my case, only the Encrypted (HTTPS) API URL was enabled, and it pointed to https://127.0.0.1:27124/.

Advertisement

That detail matters. If HTTP is disabled in Obsidian but your Antigravity config still points to http://127.0.0.1:27123, the connection will fail before MCP initialization completes.

2. Open the correct Antigravity config file

On macOS, the file is usually ~/.gemini/antigravity/mcp_config.json. If you already use GitHub MCP or other servers, keep those entries and only add or update the obsidian block under mcpServers.

Why npm E404 and initialize EOF show up together

  • First cause: the wrong npm package name triggers npm error code E404.
  • Second cause: if the MCP server process dies on startup, Antigravity surfaces that as calling "initialize": EOF.

1. The package name is obsidian-mcp-server, not @cyanheads/obsidian-mcp-server

This is the most common mistake. The GitHub repository lives under cyanheads/obsidian-mcp-server, but the npm package you should execute is obsidian-mcp-server, not the scoped name @cyanheads/obsidian-mcp-server.

Error: npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@cyanheads%2fobsidian-mcp-server
npm error 404 '@cyanheads/obsidian-mcp-server@*' could not be found
: calling "initialize": EOF

If your config still contains @cyanheads/obsidian-mcp-server inside args, replace it directly with obsidian-mcp-server.

Advertisement

2. Use OBSIDIAN_BASE_URL instead of separate host and port values

Older examples often split the connection into OBSIDIAN_HOST and OBSIDIAN_PORT. The current setup is cleaner and more reliable when you define a single OBSIDIAN_BASE_URL.

That is especially important when your Obsidian Local REST API uses HTTPS only. In that case, the safest configuration is https://127.0.0.1:27124 with OBSIDIAN_VERIFY_SSL set to false because the plugin commonly relies on a self-signed certificate.

Final Antigravity mcp_config.json example

The snippet below assumes your Obsidian Local REST API exposes the HTTPS endpoint. Replace only the API key with your own value.

{
  "mcpServers": {
    "obsidian": {
      "command": "/Users/yourname/.nvm/versions/node/v25.2.1/bin/npx",
      "args": [
        "-y",
        "obsidian-mcp-server"
      ],
      "env": {
        "PATH": "/Users/yourname/.nvm/versions/node/v25.2.1/bin:/usr/bin:/bin:/usr/sbin:/sbin",
        "OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY",
        "OBSIDIAN_BASE_URL": "https://127.0.0.1:27124",
        "OBSIDIAN_VERIFY_SSL": "false"
      }
    }
  }
}

If you explicitly enabled the non-encrypted server in Obsidian, you can switch the base URL to http://127.0.0.1:27123. The key rule is simple: match the exact active URL shown in your Obsidian plugin settings.

Advertisement

The two actual edits that fix most setups

Change "@cyanheads/obsidian-mcp-server" to "obsidian-mcp-server".

Replace separate OBSIDIAN_HOST and OBSIDIAN_PORT values with a single OBSIDIAN_BASE_URL.

Fast troubleshooting checklist

  • Make sure the Obsidian desktop app is actually running.
  • Confirm that the Local REST API plugin is enabled.
  • Verify that OBSIDIAN_API_KEY is present and not empty.
  • Check that OBSIDIAN_BASE_URL matches the active HTTP or HTTPS URL shown in Obsidian.
  • If you use HTTPS, confirm that OBSIDIAN_VERIFY_SSL is set to false.
  • Reload MCP inside Antigravity or restart the app after saving the config.
  • If your API key was exposed in logs or screenshots, rotate it immediately.

Wrapping up

Connecting Antigravity to Obsidian MCP is not complicated once the moving parts are named correctly. The package must be obsidian-mcp-server, and the connection should be defined through OBSIDIAN_BASE_URL.

Fix those two points and most npm E404 and initialize: EOF failures disappear. If you want Antigravity to work with the notes and knowledge already stored in Obsidian, this is the cleanest place to start.

Advertisement

How was this guide?

0

Comments

Sort by Newest