# Use the AstroNode astrology MCP server in Cursor

> With the server in Cursor, the agent can call the API while you build on it: compute a real chart for a test fixture, check a response shape, or compare an endpoint's output with what your code produces.

Source: https://astronode.dev/integrations/mcp-cursor · Updated: 2026-12-03

**How this page was verified:** The configuration was checked against the client's own documentation on 3 December 2026. The server was tested with the official MCP TypeScript client against the AstroNode API running in memory: every one of the 105 calculation tools that has a sample input answered, and each tool call was counted as exactly one API call. The client application itself was not part of that test.

## Hosted server

Add the server to `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for every project. Cursor resolves `${env:NAME}` in the URL and headers, so the key stays in your environment rather than in a file you might commit:

```json
{
  "mcpServers": {
    "astronode": {
      "url": "https://mcp.astronode.dev/mcp",
      "headers": { "Authorization": "Bearer ${env:ASTRONODE_API_KEY}" }
    }
  }
}
```

Set `ASTRONODE_API_KEY` in the environment Cursor starts from, then restart Cursor or reload the server from its MCP settings.

## Local server

```json
{
  "mcpServers": {
    "astronode": {
      "command": "npx",
      "args": ["-y", "@astronode/mcp"],
      "env": { "ASTRONODE_API_KEY": "aie_test_your_key" }
    }
  }
}
```

A test key (`aie_test_`) is enough while you develop. Keep a live key out of a project-level file that is committed.

## Using it while you build

In Cursor the server is most useful as a reference you can query from the editor, not as a feature of your product. Prompts that work well:

- **Fixtures from the real API.** "Compute the birth chart for 24 April 1973, 17:25, Mumbai and write the ascendant and Moon nakshatra into this test as expected values." The values come from a tool call, so the test pins what the API actually returns.
- **Parser checks.** "Call `dasha_vimshottari` for this birth and check that my `parseDasha` handles every field in the response." The agent sees the real shape, including nested `levels`.
- **Comparisons.** "Get this birth's planets from `planets` and from `western_natal_planets` and explain the 24 degree difference." (It is the ayanamsa - see the [guide](https://astronode.dev/guides/ayanamsa).)

Keep your product calling the REST API from your backend, as on the [Next.js](https://astronode.dev/integrations/nextjs) and [Express](https://astronode.dev/integrations/express) pages; the MCP server is for the assistant, not for your users.

## Billing and tool count

Each tool call is one API call on the key's plan. If Cursor struggles with 128 tools, add `?groups=charts,dasha` (or set `ASTRONODE_MCP_GROUPS` for the local server). The groups and the cost rules are on the [MCP server page](https://astronode.dev/mcp).

## Questions

**Which AstroNode endpoints does the Cursor example call?**

3 endpoints: Birth Chart (Kundli) (`POST /v1/charts/birth`); Western Natal Chart (`POST /v1/western/natal/chart`); Kundli Matching (Ashtakoot Gun Milan) (`POST /v1/compatibility`).

**Was the Cursor code on this page actually run?**

The configuration was checked against the client's own documentation on 3 December 2026. The server was tested with the official MCP TypeScript client against the AstroNode API running in memory: every one of the 105 calculation tools that has a sample input answered, and each tool call was counted as exactly one API call. The client application itself was not part of that test.

## Endpoints

- [`POST /v1/charts/birth`](https://astronode.dev/capabilities/vedic/charts-birth) - Birth Chart (Kundli) API
- [`POST /v1/western/natal/chart`](https://astronode.dev/capabilities/western/western-natal-chart) - Western Natal Chart API
- [`POST /v1/compatibility`](https://astronode.dev/capabilities/compatibility/compatibility) - Kundli Matching (Ashtakoot Gun Milan) API
