Skip to main content
Glama
ducrouxolivier

Swiss Ephemeris MCP Server

Swiss Ephemeris MCP Server

A Model Context Protocol (MCP) server that provides astronomical calculations using the Swiss Ephemeris library. Calculate planetary positions, houses, chart points, and asteroids for any date and location.

Features

  • Planetary Positions: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto

  • Lunar Nodes: True and Mean Node calculations

  • Asteroids: Chiron, Ceres, Pallas, Juno, Vesta, Lilith

  • Houses: 12-house system using Placidus

  • Chart Points: Ascendant, Midheaven, IC, Descendant

  • Additional Points: South Node, Part of Fortune

Related MCP server: Astrology MCP Server

Installation

Prerequisites for Local Development

For local use with Claude Desktop, you need to install the Swiss Ephemeris swetest command:

# Install swetest (required for Claude Desktop usage)
git clone https://github.com/aloistr/swisseph.git /tmp/swisseph && \
    cd /tmp/swisseph && \
    make && \
    cp swetest /usr/local/bin/ && \
    rm -rf /tmp/swisseph

Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "swissEphemeris": {
      "command": "npx",
      "args": ["github:dm0lz/swiss-ephemeris-mcp-server"]
    }
  }
}

Manual Installation

git clone https://github.com/dm0lz/swiss-ephemeris-mcp-server.git
cd swiss-ephemeris-mcp-server
npm install
npm start

Usage

The server provides four main tools:

calculate_planetary_positions

Calculate astronomical data for a specific date, time, and location.

Parameters:

  • datetime (string): ISO8601 format, e.g., "1985-04-12T23:20:50Z"

  • latitude (number): Latitude in decimal degrees (-90 to 90)

  • longitude (number): Longitude in decimal degrees (-180 to 180)

Returns:

  • planets: Positions of all planets and celestial bodies

  • houses: 12 astrological houses

  • chart_points: Ascendant, Midheaven, IC, Descendant

  • additional_points: South Node, Part of Fortune

calculate_transits

Calculate birth chart positions and current transits for comparison.

Parameters:

  • birth_datetime (string): Birth datetime in ISO8601 format

  • latitude (number): Birth latitude in decimal degrees

  • longitude (number): Birth longitude in decimal degrees

Returns:

  • natal_chart: Complete birth chart data

  • current_transits: Current planetary positions

  • calculation_time: Timestamp of transit calculation

calculate_solar_revolution

Calculate solar return chart for a specific year (when Sun returns to natal position).

Parameters:

  • birth_datetime (string): Birth datetime in ISO8601 format

  • birth_latitude (number): Birth latitude in decimal degrees

  • birth_longitude (number): Birth longitude in decimal degrees

  • return_year (number): Year for solar return calculation (e.g., 2024)

  • return_latitude (number, optional): Solar return location latitude

  • return_longitude (number, optional): Solar return location longitude

Returns:

  • natal_chart: Original birth chart data

  • solar_return_chart: Solar return chart for the specified year

  • natal_sun_longitude: Original Sun position in degrees

  • return_sun_longitude: Solar return Sun position in degrees

  • calculation_time: Timestamp of calculation

calculate_synastry

Calculate synastry chart between two people for relationship compatibility analysis.

Parameters:

  • person1_datetime (string): Person 1 birth datetime in ISO8601 format

  • person1_latitude (number): Person 1 birth latitude in decimal degrees

  • person1_longitude (number): Person 1 birth longitude in decimal degrees

  • person2_datetime (string): Person 2 birth datetime in ISO8601 format

  • person2_latitude (number): Person 2 birth latitude in decimal degrees

  • person2_longitude (number): Person 2 birth longitude in decimal degrees

Returns:

  • person1_chart: Complete birth chart for person 1

  • person2_chart: Complete birth chart for person 2

  • synastry_aspects: Array of planetary aspects between the charts

  • calculation_time: Timestamp of calculation

Docker

# Build and run
docker build -t swiss-ephemeris-mcp .
docker run -p 8000:8000 -e MCP_HTTP_MODE=true swiss-ephemeris-mcp

# Health check
curl http://localhost:8000/health

Transport Modes

  • Stdio: Default mode for Claude Desktop integration

  • HTTP: Use MCP_HTTP_MODE=true for web integration via ngrok

License

MIT

Available Tools

4 tools
calculate_planetary_positionsB

Calculate planetary positions, houses, chart points and asteroids for a given datetime and coordinates

ParametersJSON Schema
NameRequiredDescriptionDefault
datetimeYesISO8601 datetime, e.g., 1985-04-12T23:20:50Z
latitudeYesLatitude in decimal degrees
longitudeYesLongitude in decimal degrees, positive east

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the purpose and inputs, omitting any behavioral traits such as computational complexity, permission requirements, error handling for invalid coordinates, or the nature of the output (e.g., read-only calculation).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 15 words, front-loaded with the action 'Calculate'. It is efficient but could be restructured to include more critical information without increasing length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema and moderate complexity. The description lists what is calculated but does not clarify the return format, data structure, or assumptions (e.g., geocentric vs heliocentric). Error handling and edge cases are not mentioned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for all three parameters, so the baseline is 3. The description adds context about what is calculated (planetary positions, houses, chart points, asteroids) but does not enhance meaning beyond the schema's property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Calculate' and the resource 'planetary positions, houses, chart points and asteroids', specifying the inputs (datetime and coordinates). It effectively distinguishes this tool from siblings (calculate_solar_revolution, calculate_synastry, calculate_transits) which handle different astrological aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for calculating astrological positions but does not explicitly state when to use this tool versus alternatives. No when-not or exclusionary language is provided, leaving the agent to infer context from sibling tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_solar_revolutionB

Calculate solar return chart for a specific year. The solar return occurs when the Sun returns to the exact same position as at birth.

ParametersJSON Schema
NameRequiredDescriptionDefault
birth_datetimeYesBirth datetime in ISO8601 format, e.g., 1985-04-12T23:20:50Z
birth_latitudeYesBirth latitude in decimal degrees
birth_longitudeYesBirth longitude in decimal degrees, positive east
return_yearYesYear for the solar return calculation, e.g., 2024
return_latitudeNoLatitude for solar return location (optional, defaults to birth location)
return_longitudeNoLongitude for solar return location (optional, defaults to birth location)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Given no annotations, the description should disclose behavioral traits like permissions, side effects, or output nature. It only explains the concept of a solar return, not whether it's read-only, what data it accesses, or what the output contains (no output schema).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences front-load the purpose and provide a concise astronomical definition. No redundant information; every word contributes to understanding the tool's core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 parameters and no output schema, the description lacks completeness. It doesn't explain the output format, how the chart differs from transits, or what the optional location parameters imply (e.g., relocation chart). It's insufficient for a complex astrological tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the description doesn't need to add parameter details. It provides context about the solar return but no additional meaning for individual parameters, maintaining the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states it calculates a solar return chart and defines the astronomical event (Sun returning to birth position). This clearly distinguishes it from sibling tools like planetary positions, synastry, or transits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., transits or synastry). It only states the tool's function without contextualizing its use relative to siblings or providing prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_synastryA

Calculate synastry chart between two people for relationship compatibility analysis. Compares planetary positions and calculates aspects between the charts.

ParametersJSON Schema
NameRequiredDescriptionDefault
person1_datetimeYesPerson 1 birth datetime in ISO8601 format, e.g., 1985-04-12T23:20:50Z
person1_latitudeYesPerson 1 birth latitude in decimal degrees
person1_longitudeYesPerson 1 birth longitude in decimal degrees, positive east
person2_datetimeYesPerson 2 birth datetime in ISO8601 format, e.g., 1990-08-25T14:30:00Z
person2_latitudeYesPerson 2 birth latitude in decimal degrees
person2_longitudeYesPerson 2 birth longitude in decimal degrees, positive east

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that it compares positions and calculates aspects, but lacks details on output format, calculation methodology, or any side effects. With no annotations, the description carries the burden but is insufficiently detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no fluff. Every word adds value: clear verb, resource, and what the calculation entails. Well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is provided, yet the description does not detail the return values. For a tool with 6 required parameters and no annotations, the description is insufficiently complete; it should hint at the output structure or any important behavioral details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all 6 parameters. The description adds no additional meaning beyond what the schema already provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the verb 'calculate' and resource 'synastry chart', and explains it compares planetary positions and aspects for relationship compatibility. It uniquely distinguishes from sibling tools like calculate_planetary_positions (single person).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for relationship compatibility but does not explicitly state when to use this tool versus alternatives like calculate_transits or calculate_solar_revolution. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_transitsA

Calculate birth chart positions and current transits for comparison. Returns both natal chart and current planetary positions.

ParametersJSON Schema
NameRequiredDescriptionDefault
birth_datetimeYesBirth datetime in ISO8601 format, e.g., 1985-04-12T23:20:50Z
latitudeYesBirth latitude in decimal degrees
longitudeYesBirth longitude in decimal degrees, positive east

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool calculates and returns positions, but gives no insight into behavior such as required authentication, rate limits, error handling for invalid coordinates, or the format of the return data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no wasted words. The key information is front-loaded: purpose and return value are immediately clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description adequately explains that both natal and current planetary positions are returned. For a tool with 3 parameters and moderate complexity, this is nearly complete; however, it could benefit from mentioning the scope of planets or aspects included.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: birth_datetime, latitude, and longitude are all clearly described in the schema. The tool description adds no additional parameter context beyond what is already provided by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool calculates birth chart positions and current transits for comparison, and returns both natal chart and current planetary positions. This distinguishes it from siblings like calculate_planetary_positions (likely just positions) and calculate_synastry (comparison between two people).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when comparing natal and transit positions, but does not explicitly state when to use this tool versus alternatives like calculate_planetary_positions or calculate_solar_revolution. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.2
    • First observedcalculate_planetary_positions
    • First observedcalculate_solar_revolution
    • First observedcalculate_synastry
    • First observedcalculate_transits

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation4/5

Each tool targets a distinct astrological calculation (general positions, solar return, synastry, transits), but calculate_planetary_positions and calculate_transits both involve planetary positions, potentially causing confusion. Descriptions help differentiate.

Naming Consistency5/5

All tools use a consistent 'calculate_' verb followed by a snake_case noun phrase, forming a clear and predictable pattern.

Tool Count5/5

With 4 tools, the set is well-scoped for an ephemeris server, covering essential calculations without being overly sparse or bloated.

Completeness4/5

The tools cover key astrological functions (positions, transits, synastry, solar return), but missing some operations like progressions or aspect-only calculations, though these may be included in outputs.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    B
    maintenance
    Comprehensive astrology MCP exposing every endpoint of the AstroWay Calculation API — natal charts, synastry, transits, Vedic dashas, Tarot, Numerology, Human Design. Sub-arcsecond Swiss Ephemeris precision, 10 000 free credits per month.
    100
    261
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Calculates astrological birth charts including planetary positions, house placements, and aspects based on birth date, time, and location.
    714
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    High-precision astrology tools for LLM agents, including natal charts, transits, progressions, synastry, and more, backed by Swiss Ephemeris.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes Vedic astrology tools for birth chart, dasha, transit calculations, and question context analysis.
    MIT