
Connects Claude to the Macrostrat API for querying geologic data across the globe. You can look up bedrock units, stratigraphic columns, mineral occurrences, and geologic timescales for any coordinates, plus pull map tiles for visualization. The natural language queries work well for location-based questions like "what's the geologic history of Nashville" and return detailed formation data spanning billions of years. Most useful when you need authoritative geologic context for a specific area, whether you're doing environmental analysis, research, or just satisfying curiosity about what's under your feet. The example output shows it handles complex stratigraphic sequences cleanly, walking through everything from Mesoproterozoic basement to Cenozoic erosion.
MCP server for Macrostrat API
An MCP server providing access to the Macrostrat API from Claude Desktop, Claude Code, and any other MCP client.
npx -y macrostrat-mcp
No API key required — the Macrostrat API is free and public.
This Model Context Protocol (MCP) server enables AI assistants and applications to:
Users can run queries using natural language.
Q. What is the geologic history of Nashville, TN?
A. Let me check the geological data for Nashville's location.
View Result from find-units from macrostrat (local)
{
"lat": 36.1627,
"lng": -86.7816,
"responseType": "long"
}
The bedrock of Nashville today consists primarily of Ordovician limestone formations exposed at the surface, particularly the Stones River and Nashville Group limestones. These rocks are well exposed in many areas and have influenced the development of local karst topography, including caves and sinkholes that are common in the region.
Requires Node.js 20 or newer. No install step is needed — npx fetches the server on
first run.
Open your Claude Desktop configuration at:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the server configuration:
{
"mcpServers": {
"macrostrat": {
"command": "npx",
"args": ["-y", "macrostrat-mcp"]
}
}
}
Once you restart you should see an icon for search and tools. Click this button to see the MCP tools available.
claude mcp add macrostrat -- npx -y macrostrat-mcp
The server speaks MCP over STDIO. Run it with npx -y macrostrat-mcp, or install it
globally with npm install -g macrostrat-mcp and run macrostrat-mcp.
npm install # install dependencies
npm run dev # run from source over STDIO, no build step
npm run build # compile TypeScript to build/
npm run typecheck # type-check without emitting
src/server.ts holds all the tools, prompts, and API calls — that is the file to edit.
src/index.ts is just the STDIO entry point.
To point Claude Desktop at a local build instead of the published package, use
"command": "node" with "args": ["/full/path/to/macrostrat/build/index.js"], and
restart Claude Desktop after each rebuild.
The server factory is exported if you want to attach a different transport:
import createServer from "macrostrat-mcp";
const server = createServer();
await server.connect(yourTransport);
If Claude Desktop cannot find npx, provide its full path (on macOS, typically
/usr/local/bin/npx or /opt/homebrew/bin/npx). The same applies to node if you are
running a local build.