USDA NASS MCP Server

USDA NASS MCP Server

Enables access to USDA NASS agricultural statistics data through natural language queries, supporting full dataset retrieval, record counts, and parameter discovery.

Category
Visit Server

README

MCP Server for USDA NASS API

The USDA National Agricultural Statistics Service API, known as Quick Stats, contains survey and census data on United States agricultural production.

NASS API access

Request an API key here.

Tools

get_full_dataset(query: Query) -> str

Get all available data for a given commodity, location, and time.

Arguments:

  • query (Query): Dictionary with three keys, "commodity", "location", and "time", each with a dictionary of parameter and value pairs.

Returns:

  • str: Full response text as a string

get_db_record_count(query: Query) -> str

Get the number, or count, of database records of a given commodity for a location and time.

Arguments:

  • query (Query): Dictionary with three keys, "commodity", "location", and "time", each with a dictionary of parameter and value pairs.

Returns:

  • str: String of JSON data with one key, "count", and a value of the number of records.

get_param_values(query: ParameterQuery) -> str

Get all possible values of a query parameter by its name.

Arguments:

  • parameter (ParameterQuery): Dictionary with one key, "param", and a value of the parameter name to get the values for.

Returns:

  • str: String of JSON data with the parameter names and all their possible values as a list.

Getting started

I highly recommend using uv for package and virtual environment management.

Docker

The Dockerfile is setup to run the MCP server with default settings. Using make, you can build an image and run a container:

  • build: build the image from Dockerfile
  • run: run the MCP server with default settings (e.g. localhost, 8000:8000)

The short way

Setup command

If you have make, uv, and are on macOS/Linux, running make setup should be all you need to get started with the project.

The long way

Installation

Activate your virtual environment and:

pip install -r requirements.txt

.env

Copy the .env.example to a .env file. Replace the value of NASS_API_KEY with your NASS API key.

Configuration

There are several configuration options for changing functionality of the MCP server.

The following configurations are available as environment variables:

Option Values Default Description
NASS_API_KEY string Your NASS API key
NASS_MCP_HOST string 0.0.0.0 The host to run the MCP server on
NASS_MCP_PORT integer 8000 The port to run the MCP server on
NASS_MCP_FORMAT CSV or JSON or XML CSV The format to return the data in from the NASS API /api_GET endpoint
NASS_ENV production A flag for telling the MCP server to skip local dev steps (e.g. load_dotenv)

The following configurations are available as command line arguments

Option Values Default Description
-t --transport streamable-http or stdio streamable-http Transport protocol for the MCP server

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured