ALMA_MCP
About
A Model Context Protocol (MCP) server that provides comprehensive access to the ALMA (Atacama Large Millimeter/submillimeter Array) archive through a clean, extensible architecture.
Details
- Author
- adamzacharia
- Categories
- Other, API
Jump to
Using a Custom Environment (Conda or venv)
If you installed the dependencies in aconda environmentorvenv, you MUST specify the full path to that environment's Python executable. Otherwise the system won't find the installed packages!
{ "mcpServers": { "alma": { "command": "C:/Users/YourName/anaconda3/envs/alma_mcp/python.exe", "args": ["c:/path/to/ALMA_MCP/server.py"], "cwd": "c:/path/to/ALMA_MCP", "env": {} } } }
To find your conda environment's Python path, run:
conda activate alma_mcp where python # Windows which python # Mac/Linux
{ "mcpServers": { "alma": { "command": "c:/path/to/ALMA_MCP/venv/Scripts/python.exe", "args": ["c:/path/to/ALMA_MCP/server.py"], "cwd": "c:/path/to/ALMA_MCP", "env": {} } } }
- Quit Claude Desktop completely(right-click system tray → Quit)
- Check Task Manager- If Claude is still running in the background, end the task
- Reopen Claude Desktop
- Test with a querylike:
- "Search ALMA for observations of M87"
- "Find high-resolution ALMA data with resolution under 0.5 arcseconds"
- "What are ALMA's frequency bands?"
# Check Python environment python --version # Should be 3.10+ # Test server manually python server.py # Should start without errors
- Verify the Python path in your config is correct
- Ensure all dependencies are installed
- Check thatserver.pyexists at the specified path
pip install fastmcp alminer pyvo astroquery astropy pandas
Once configured, you can ask natural language questions about ALMA data:
- "Find observations of Orion KL"
- "Search ALMA for M87 within 1 arcminute"
- "What ALMA data exists for NGC 1234?"
- "Search ALMA at RA=83.6, Dec=-5.4"
- "Find observations near the Galactic Center"
- "Cone search at coordinates 150.5, 2.2 with 5 arcmin radius"
- "Find ALMA data between 230 and 250 GHz"
- "Search for Band 6 observations"
- "What observations cover the CO(2-1) line at 230.5 GHz?"
- "Find high-resolution data with resolution under 0.1 arcseconds"
- "Search for ALMA observations better than 0.5 arcsec resolution"
- "Find ALMA proposals by Adele Plunket"
- "Get data for proposal 2023.1.00001.S"
- "Search for galaxy evolution proposals"
- "Do any M87 observations cover the CO(2-1) line?"
- "Check if Orion data covers HCN(1-0) at 88.6 GHz"
- "Find observations that cover 115 GHz for a source at z=0.5"
- "Run this SQL: SELECT target_name, band_list FROM ivoa.obscore WHERE target_name LIKE '%M87%'"
- "Query ALMA for all Band 7 observations from 2023"
- "What are ALMA's frequency bands?"
- "List common spectral lines in the mm range"
- "What science categories does ALMA support?"
- "Find ALMA observations published in Nature"
- "Search for data used in papers by Smith published in 2023"
- "What ALMA data has the bibcode 2017ApJ...834..140R"
- "Find all ALMA observations tagged with 'Quasars'"
- "Search for Sub-mm Galaxies (SMG) observations"
- "What observations are categorized under 'Active Galactic Nuclei'?"
- "Find all spectral cubes for M87"
- "Search for continuum images tagged with Exoplanets"
- "Show me spectral line observations in Band 6"
- "Find proposals mentioning black holes in their abstract"
- "Search for observations from proposals about star formation"
- "What proposals mention the cosmic microwave background?"
- "Find observations with continuum sensitivity better than 0.1 mJy/beam"
- "Search for deep ALMA observations under 0.05 mJy sensitivity"
- "Check if ALMA has observed M31, M51, M82, and NGC 1068"
- "Query ALMA for these sources: Cen A, M83, and NGC 1234"
You can use this MCP server with LangChain using thelangchain-mcp-adapterspackage:
from langchain_mcp_adapters.client import MCPClient from langchain_openai import ChatOpenAI # Connect to the MCP server client = MCPClient( command="python", args=["path/to/ALMA_MCP/server.py"] ) # Get tools from MCP server tools = client.get_tools() # Use with any LangChain-compatible LLM llm = ChatOpenAI(model="gpt-4") llm_with_tools = llm.bind_tools(tools)
For open source LLMs (Ollama, LMStudio, etc.), you can:
-
Use MCP-compatible clients: Some open source projects like[MCP CLIsupport connecting MCP servers to local LLMs.
Direct function calling: Import the server functions directly in your Python code:
from server import search_alma_by_target, search_alma_by_position, get_alma_info # Use tools directly result = search_alma_by_target("M87", search_radius_arcmin=5.0) print(result) # Get ALMA reference info info = get_alma_info() print(info)
- Build a REST API: Wrap the MCP tools in a FastAPI/Flask server for any LLM that supports function calling via HTTP.
ALMA_MCP/ ├── server.py # Main MCP server with 16 tools ├── requirements.txt # Python dependencies ├── test_server.py # Test suite └── README.md # This file
- Target Search: Resolve object names via SIMBAD and search ALMA
- Position Search: Cone search by RA/Dec coordinates
- Proposal Search: Find by PI name, proposal ID, or science category
- Frequency Search: Query by frequency range (GHz)
- Resolution Search: Filter by angular resolution (arcsec)
- Custom SQL: Run any ADQL query against ALMA TAP
ALMA MCP Server - Astronomical Data Access via Natural Language
A Model Context Protocol (MCP) server that provides comprehensive access to the ALMA (Atacama Large Millimeter/submillimeter Array) archive through a clean, extensible architecture.
This MCP server transforms ALMA archive queries from a software engineering problem into anatural language conversation. Instead of learning TAP/ADQL syntax and archive APIs, researchers simply ask for what they need and get clean, analysis-ready results.
The result: AI assistants that can seamlessly search ALMA data by target, position, frequency, resolution, or any custom criteria
IMPORTANT: Change the paths below according to YOUR installation location!
# Clone the repository (or copy the ALMA_MCP folder) git clone https://github.com/adamzacharia/ALMA_MCP.git cd ALMA_MCP # Create a dedicated conda environment with Python 3.11+ conda create -n alma_mcp python=3.11 conda activate alma_mcp # Install dependencies pip install -r requirements.txt # Install astronomical libraries for full functionality pip install fastmcp alminer pyvo astroquery astropy pandas
Alternative: Using venv instead of conda:
# Navigate to the ALMA_MCP folder cd path/to/ALMA_MCP # Create a dedicated venv environment python -m venv venv venv\Scripts\activate # Windows # source venv/bin/activate # Mac/Linux # Install dependencies pip install -r requirements.txt
# Test basic functionality python test_server.py # Quick test (optional) python -c " from server import get_alma_info, ALMINER_AVAILABLE, PYVO_AVAILABLE print(' Server loads successfully') print(f' alminer available: {ALMINER_AVAILABLE}') print(f' pyvo available: {PYVO_AVAILABLE}') "
Find and edit the Claude Desktop MCP configuration file:
-
Navigate to your Claude Desktop AppData folder:
- Windows: Open File Explorer and go to%APPDATA%\Claude\
- macOS:~/Library/Application Support/Claude/
add the 'claude_desktop_config.json' or add the below to your 'config.json' file
Add the following configuration to the file:
IMPORTANT: Change the path below according to YOUR installation location!
{ "mcpServers": { "alma": { "command": "python", "args": ["c:/Users/Asus/Desktop/Quasar-main/ALMA_MCP/server.py"] } } }
Note: Use forward slashes/in paths even on Windows.
Using a Custom Environment (Conda or venv)
If you installed the dependencies in aconda environmentorvenv, you MUST specify the full path to that environment's Python executable. Otherwise the system won't find the installed packages!
{ "mcpServers": { "alma": { "command": "C:/Users/YourName/anaconda3/envs/alma_mcp/python.exe", "args": ["c:/path/to/ALMA_MCP/server.py"], "cwd": "c:/path/to/ALMA_MCP", "env": {} } } }
To find your conda environment's Python path, run:
conda activate alma_mcp where python # Windows which python # Mac/Linux
{ "mcpServers": { "alma": { "command": "c:/path/to/ALMA_MCP/venv/Scripts/python.exe", "args": ["c:/path/to/ALMA_MCP/server.py"], "cwd": "c:/path/to/ALMA_MCP", "env": {} } } }
- Quit Claude Desktop completely(right-click system tray → Quit)
- Check Task Manager- If Claude is still running in the background, end the task
- Reopen Claude Desktop
- Test with a querylike:
- "Search ALMA for observations of M87"
- "Find high-resolution ALMA data with resolution under 0.5 arcseconds"
- "What are ALMA's frequency bands?"
# Check Python environment python --version # Should be 3.10+ # Test server manually python server.py # Should start without errors
- Verify the Python path in your config is correct
- Ensure all dependencies are installed
- Check thatserver.pyexists at the specified path
pip install fastmcp alminer pyvo astroquery astropy pandas
Once configured, you can ask natural language questions about ALMA data:
- "Find observations of Orion KL"
- "Search ALMA for M87 within 1 arcminute"
- "What ALMA data exists for NGC 1234?"
- "Search ALMA at RA=83.6, Dec=-5.4"
- "Find observations near the Galactic Center"
- "Cone search at coordinates 150.5, 2.2 with 5 arcmin radius"
- "Find ALMA data between 230 and 250 GHz"
- "Search for Band 6 observations"
- "What observations cover the CO(2-1) line at 230.5 GHz?"
- "Find high-resolution data with resolution under 0.1 arcseconds"
- "Search for ALMA observations better than 0.5 arcsec resolution"
- "Find ALMA proposals by Adele Plunket"
- "Get data for proposal 2023.1.00001.S"
- "Search for galaxy evolution proposals"
- "Do any M87 observations cover the CO(2-1) line?"
- "Check if Orion data covers HCN(1-0) at 88.6 GHz"
- "Find observations that cover 115 GHz for a source at z=0.5"
- "Run this SQL: SELECT target_name, band_list FROM ivoa.obscore WHERE target_name LIKE '%M87%'"
- "Query ALMA for all Band 7 observations from 2023"
- "What are ALMA's frequency bands?"
- "List common spectral lines in the mm range"
- "What science categories does ALMA support?"
- "Find ALMA observations published in Nature"
- "Search for data used in papers by Smith published in 2023"
- "What ALMA data has the bibcode 2017ApJ...834..140R"
- "Find all ALMA observations tagged with 'Quasars'"
- "Search for Sub-mm Galaxies (SMG) observations"
- "What observations are categorized under 'Active Galactic Nuclei'?"
- "Find all spectral cubes for M87"
- "Search for continuum images tagged with Exoplanets"
- "Show me spectral line observations in Band 6"
- "Find proposals mentioning black holes in their abstract"
- "Search for observations from proposals about star formation"
- "What proposals mention the cosmic microwave background?"
- "Find observations with continuum sensitivity better than 0.1 mJy/beam"
- "Search for deep ALMA observations under 0.05 mJy sensitivity"
- "Check if ALMA has observed M31, M51, M82, and NGC 1068"
- "Query ALMA for these sources: Cen A, M83, and NGC 1234"
You can use this MCP server with LangChain using thelangchain-mcp-adapterspackage:
from langchain_mcp_adapters.client import MCPClient from langchain_openai import ChatOpenAI # Connect to the MCP server client = MCPClient( command="python", args=["path/to/ALMA_MCP/server.py"] ) # Get tools from MCP server tools = client.get_tools() # Use with any LangChain-compatible LLM llm = ChatOpenAI(model="gpt-4") llm_with_tools = llm.bind_tools(tools)
For open source LLMs (Ollama, LMStudio, etc.), you can:
-
Use MCP-compatible clients: Some open source projects likeMCP CLIsupport connecting MCP servers to local LLMs.
Direct function calling: Import the server functions directly in your Python code:
from server import search_alma_by_target, search_alma_by_position, get_alma_info # Use tools directly result = search_alma_by_target("M87", search_radius_arcmin=5.0) print(result) # Get ALMA reference info info = get_alma_info() print(info)
- Build a REST API: Wrap the MCP tools in a FastAPI/Flask server for any LLM that supports function calling via HTTP.
ALMA_MCP/ ├── server.py # Main MCP server with 16 tools ├── requirements.txt # Python dependencies ├── test_server.py # Test suite └── README.md # This file
- Target Search: Resolve object names via SIMBAD and search ALMA
- Position Search: Cone search by RA/Dec coordinates
- Proposal Search: Find by PI name, proposal ID, or science category
- Frequency Search: Query by frequency range (GHz)
- Resolution Search: Filter by angular resolution (arcsec)
- Custom SQL: Run any ADQL query against ALMA TAP
Extended Query Tools (8 new - from ALMA notebooks)
- alminer: Advanced ALMA queries with spectral line tools
- pyvo: Direct TAP/ADQL access to ALMA archive
- astroquery: SIMBAD name resolution
fastmcp>=2.0.0 # MCP framework pandas>=1.5.0 # Data manipulation
alminer>=0.2.0 # Advanced ALMA queries pyvo>=1.4.0 # TAP/ADQL access astroquery>=0.4.0 # SIMBAD, VizieR, etc. astropy>=5.0.0 # Astronomical utilities
- ALMA target name search with SIMBAD resolution
- Position-based cone search
- Frequency range search
- Angular resolution filtering
- Proposal/PI search
- Spectral line coverage check
- Custom SQL/TAP queries
- ALMA info and band reference
- Source name search (PI-specified names, exact/partial)
- Bibliography/publication search (bibcode, journal, author, year)
- Member OUS ID search (dataset identifier)
- Data type filtering (cubes vs images)
- Science keyword search with filters
- Abstract full-text search (proposal and publication)
- Sensitivity-based search (continuum or line)
- Batch multi-source queries
- VLA archive integration
- GBT archive integration
- Result caching for faster queries
- FITS file download support
- Cross-archive object matching (ALMA + VLA + optical)
- Visualization tools (sky plots, spectra)
- Data download workflow
This folder is designed to be portable. To move it:
- Copy the entireALMA_MCP/folder to your desired location
- Update the path inconfig.json
- Restart Claude Desktop
- Fork the repository
- Create a feature branch (git checkout -b feature/vla-support)
- Add your data source following existing patterns
- Write tests for new functionality
- Submit a pull request
- Adam Zacharia Anil- Lead Developer
- Adele Plunkett- Scientific Advisor
- Adele Plunkett- For valuable guidance and advice throughout this project
- NRAO (National Radio Astronomy Observatory)- For supporting astronomical research and data access
- Brian Mason- For technical expertise and support
- Cosmic AI / Stella Offner- For inspiration in applying AI to astronomical research
If you use this software in your research, please cite:
@software{alma_mcp, title={ALMA MCP Server: Astronomical Data Access for AI Agents}, author={Adam Zacharia Anil and Adele Plunkett}, year={2025}, url={https://github.com/adamzacharia/ALMA_MCP} }
- Issues:GitHub Issues
- Documentation: This README and inline code comments
- Discussions:GitHub Discussions
Remote MCP server giving AI agents instant access to comprehensive vehicle data: VIN decoding, license-plate lookup, stolen-vehicle checks, mileage history, inspection records, photos, and market valuations across 24 markets. Connect with a single Authorization: Bearer API key from any MCP client (Claude Desktop, Claude Code, Cursor, ChatGPT, Cline, Zed). Stateless and hosted at https://mcp.carapi.dev/mcp — no setup, no session management, just plug in your key and start querying. Includes a free carapi_docs tool for searching CarAPI documentation without authentication.
Verify US/Canada freight carriers and brokers: live FMCSA data, trust scores, registry search, and partner watchlist monitoring for AI agents.
Real-time Amazon data API built for AI agents. 200M+ products, 1B+ reviews, live BSR, pricing, and competitor data as clean JSON. 10 agent skills for market research, competitor monitoring, pricing, listing audits, and more. 1,000 free credits.
Search and access clinical trial data from ClinicalTrials.gov.
DataForB2B is a people and company search API
US stock market & financial data — SEC filings full-text search, XBRL fundamentals, 13F institutional holdings, insider & congressional trades, earnings-call transcripts, short interest, and FRED macro; 90+ tools, free tier, self-hostable.
A Centralized MCP Server for Fetching Data from Many Countries' Govs
Interact with the Kaggle API to access datasets, notebooks, and competitions.
An AI-powered API for medical research, unifying ClinicalTrials.gov, PubMed, and FDA databases with intelligent analysis.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




