astronomy-oracle 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/data/NGC.csv +13970 -0
- package/data/addendum.csv +65 -0
- package/dist/astro/coordinates.d.ts +20 -0
- package/dist/astro/coordinates.d.ts.map +1 -0
- package/dist/astro/coordinates.js +45 -0
- package/dist/astro/coordinates.js.map +1 -0
- package/dist/astro/time.d.ts +20 -0
- package/dist/astro/time.d.ts.map +1 -0
- package/dist/astro/time.js +53 -0
- package/dist/astro/time.js.map +1 -0
- package/dist/astro/visibility.d.ts +25 -0
- package/dist/astro/visibility.d.ts.map +1 -0
- package/dist/astro/visibility.js +119 -0
- package/dist/astro/visibility.js.map +1 -0
- package/dist/data/catalog.d.ts +20 -0
- package/dist/data/catalog.d.ts.map +1 -0
- package/dist/data/catalog.js +127 -0
- package/dist/data/catalog.js.map +1 -0
- package/dist/data/parse-coordinates.d.ts +13 -0
- package/dist/data/parse-coordinates.d.ts.map +1 -0
- package/dist/data/parse-coordinates.js +39 -0
- package/dist/data/parse-coordinates.js.map +1 -0
- package/dist/format.d.ts +20 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +204 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/search.d.ts +11 -0
- package/dist/lib/search.d.ts.map +1 -0
- package/dist/lib/search.js +21 -0
- package/dist/lib/search.js.map +1 -0
- package/dist/register-tools.d.ts +6 -0
- package/dist/register-tools.d.ts.map +1 -0
- package/dist/register-tools.js +12 -0
- package/dist/register-tools.js.map +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +14 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/lookup-object.d.ts +6 -0
- package/dist/tools/lookup-object.d.ts.map +1 -0
- package/dist/tools/lookup-object.js +82 -0
- package/dist/tools/lookup-object.js.map +1 -0
- package/dist/tools/plan-session.d.ts +6 -0
- package/dist/tools/plan-session.d.ts.map +1 -0
- package/dist/tools/plan-session.js +118 -0
- package/dist/tools/plan-session.js.map +1 -0
- package/dist/tools/search-objects.d.ts +6 -0
- package/dist/tools/search-objects.d.ts.map +1 -0
- package/dist/tools/search-objects.js +108 -0
- package/dist/tools/search-objects.js.map +1 -0
- package/dist/types.d.ts +72 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +28 -0
- package/dist/types.js.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 gregario
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
3
|
+
<a href="https://www.npmjs.com/package/astronomy-oracle"><img src="https://img.shields.io/npm/v/astronomy-oracle.svg" alt="npm version"></a>
|
|
4
|
+
<a href="https://www.npmjs.com/package/astronomy-oracle"><img src="https://img.shields.io/npm/dm/astronomy-oracle.svg" alt="npm downloads"></a>
|
|
5
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-18%2B-brightgreen.svg" alt="Node.js 18+"></a>
|
|
6
|
+
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-purple.svg" alt="MCP Compatible"></a>
|
|
7
|
+
<a href="https://github.com/sponsors/gregario"><img src="https://img.shields.io/badge/sponsor-%E2%99%A5-ea4aaa.svg" alt="Sponsor"></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
# Astronomy Oracle
|
|
11
|
+
|
|
12
|
+
Accurate astronomical catalog data and observing session planner for LLM assistants. Stops hallucinated magnitudes, coordinates, and visibility.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **3 tools** for object lookup, catalog search, and observing session planning
|
|
17
|
+
- **13,000+ deep-sky objects** from the OpenNGC catalog (NGC, IC, Messier, and addendum objects)
|
|
18
|
+
- **Deterministic astronomy math** — Julian dates, sidereal time, alt/az conversion, rise/transit/set times
|
|
19
|
+
- **Zero network dependency** — all data is bundled, all calculations are local
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
Run directly with npx:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx astronomy-oracle
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or install globally:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g astronomy-oracle
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Configuration
|
|
36
|
+
|
|
37
|
+
### Claude Desktop
|
|
38
|
+
|
|
39
|
+
Add to your `claude_desktop_config.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"astronomy-oracle": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["-y", "astronomy-oracle"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Claude Code
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
claude mcp add astronomy-oracle -- npx -y astronomy-oracle
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Tool Reference
|
|
59
|
+
|
|
60
|
+
### `lookup_object`
|
|
61
|
+
|
|
62
|
+
Look up a celestial object by Messier number, NGC/IC designation, or common name. Optionally compute visibility from a given location and time.
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"name": "lookup_object",
|
|
67
|
+
"arguments": {
|
|
68
|
+
"name": "M31",
|
|
69
|
+
"latitude": 51.5,
|
|
70
|
+
"longitude": -0.1,
|
|
71
|
+
"date": "2025-06-15T22:00:00Z"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Returns detailed object data: type, coordinates (RA/Dec), magnitude, angular size, surface brightness, Hubble type, cross-references, and (when location is provided) current altitude/azimuth with rise/transit/set times.
|
|
77
|
+
|
|
78
|
+
### `search_objects`
|
|
79
|
+
|
|
80
|
+
Search and filter the catalog by type, constellation, magnitude range, angular size, or catalog membership.
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"name": "search_objects",
|
|
85
|
+
"arguments": {
|
|
86
|
+
"type": "PN",
|
|
87
|
+
"constellation": "Lyr",
|
|
88
|
+
"maxMagnitude": 12.0,
|
|
89
|
+
"limit": 10
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Returns a formatted table of matching objects sorted by brightness. Supports filtering by object type (Galaxy, Planetary Nebula, Open Cluster, etc.), constellation, magnitude range, minimum angular size, and catalog (Messier, Caldwell, NGC, IC).
|
|
95
|
+
|
|
96
|
+
### `plan_session`
|
|
97
|
+
|
|
98
|
+
Generate an observing session plan for a given location and date. Returns the best objects to observe grouped by time window.
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"name": "plan_session",
|
|
103
|
+
"arguments": {
|
|
104
|
+
"latitude": 40.7,
|
|
105
|
+
"longitude": -74.0,
|
|
106
|
+
"date": "2025-03-20",
|
|
107
|
+
"minAltitude": 20,
|
|
108
|
+
"maxMagnitude": 10.0,
|
|
109
|
+
"types": ["G", "PN", "GCl"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Returns objects grouped into three windows (evening, midnight, pre-dawn), scored by observability based on altitude, magnitude, and angular size.
|
|
115
|
+
|
|
116
|
+
## Data Sources
|
|
117
|
+
|
|
118
|
+
| Source | License | Description |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| [OpenNGC](https://github.com/mattiaverga/OpenNGC) | CC-BY-SA 4.0 | NGC/IC/Messier catalog with coordinates, magnitudes, dimensions, and cross-references |
|
|
121
|
+
|
|
122
|
+
The OpenNGC data is included under the Creative Commons Attribution-ShareAlike 4.0 International License. See the [OpenNGC repository](https://github.com/mattiaverga/OpenNGC) for full attribution.
|
|
123
|
+
|
|
124
|
+
## Development
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Run tests
|
|
128
|
+
npm test
|
|
129
|
+
|
|
130
|
+
# Build
|
|
131
|
+
npm run build
|
|
132
|
+
|
|
133
|
+
# Run in development mode (tsx)
|
|
134
|
+
npm run dev
|
|
135
|
+
|
|
136
|
+
# Open MCP Inspector
|
|
137
|
+
npm run inspect
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
MIT for code. CC-BY-SA 4.0 for OpenNGC data.
|