Interface for AI agents to use your astrophotography setup using N.I.N.A (Beta)
A powerful interface for controlling N.I.N.A. (Nighttime Imaging 'N' Astronomy) software through its Advanced API NINA Advanced API . This Model Context Protocol Server (MCP) enables AI agents to interact with NINA using tools, providing new way to interact with your setup. Usage with your own responsibility.
-
Complete Equipment Control for AI agents
- Cameras (capture, cooling, settings, connecting ....)
- Mounts (slewing, parking, tracking...)
- Focusers (movement, temperature compensation ... )
- Filter Wheels (filter selection, info ...)
- Domes (rotation, shutter control ...)
- Rotators (movement, sync...)
- ...
-
AI Integration
- Natural language command processing
- Contextual help system
- Intelligent error responses
- Automated decision making
-
**Most of the NINA advanced API v2 api interface endpoints supported
- Python 3.8 or higher
- NINA software with Advanced API plugin
uv
package manager- AI agent with MCP support (e.g., Claude)
-
Install NINA Advanced API Plugin
# Install the plugins in NINA # Enable and configure in NINA settings
-
Clone Repository
git clone https://github.com/PaDev1/Nina_advanced_api_mcp.git cd nina-mcp
-
Set Environment Variables
# Create .env file NINA_HOST=your_nina_host NINA_PORT=1888 LOG_LEVEL=INFO IMAGE_SAVE_DIR=~/Desktop/NINA_Images
Add to your AI agent's MCP configuration:
{
"mcpServers": {
"nina_advanced_mcp_api": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp,fastapi,uvicorn,pydantic,aiohttp,requests,python-dotenv",
"fastmcp",
"run",
"path/nina_advanced_mcp.py"
],
"env": {
"NINA_HOST": "NINA_IP",
"NINA_PORT": "1888",
"LOG_LEVEL": "INFO",
"IMAGE_SAVE_DIR": "~/Desktop/NINA_Images"
}
}
}
}
- Connect to nina
- read the setup
- connect my camera, mount, filter wheel and guider
- read the sequesces and let me select the sequence to start
- "Take a 30-second exposure of M31"
- "Connect all equipment and start cooling the camera to -10°C"
- "Start a sequence targeting NGC 7000"
- "Get the current equipment status"
- Camera operations
- Mount control
- Focuser management
- Filter wheel control
- Dome automation
- Rotator functions
- Capture configuration
- Image processing
- File management
- Statistics gathering
- Connection handling
- Status monitoring
- Error management
- Configuration
Contributions are welcome! Please read our Contributing Guidelines first.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Found a bug? Please open an issue with:
- Detailed description
- Steps to reproduce
- Expected vs actual behavior
- System information
This project is licensed under the MIT License - see the LICENSE file for details.
- NINA - The core astronomy software
- NINA Advanced API - API documentation
- Touch'N'Stars - WebApp for Mobile Control of NINA
- NINA Plugins - Official NINA plugin repository