USDA NASS MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@USDA NASS MCP Server show me corn production in Iowa 2023"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: USDA MCP Server
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 fromDockerfilerun: 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 |
| Your NASS API key | |
NASS_MCP_HOST |
|
| The host to run the MCP server on |
NASS_MCP_PORT |
|
| The port to run the MCP server on |
NASS_MCP_FORMAT |
|
| The format to return the data in from the NASS API |
NASS_ENV |
| A flag for telling the MCP server to skip local dev steps (e.g. |
The following configurations are available as command line arguments
Option | Values | Default | Description |
|
|
| Transport protocol for the MCP server |
Available Tools
3 toolsget_db_record_countB
Get the number, or count, of database records of a given commodity for a location and time.
Args:
query: Dictionary with three keys, "commodity", "location", and "time", each with a dictionary of parameter and value pairs.
Returns:
A JSON string containing one key, "count", and a value of the number of records or an error message.
Inputs: query (required). Returns: result
get_full_datasetC
Get all available data for a given commodity, location, and time.
Args:
query: Dictionary with three keys, "commodity", "location", and "time", each with a dictionary of parameter and value pairs.
Returns:
A string containing the API response data or an error message.
Inputs: query (required). Returns: result
get_param_valuesB
Get all possible values of a query parameter by its name.
Args:
parameter: Dictionary with one key, "param", and a value of the parameter name to get the values for.
Returns:
A JSON string with the parameter name and all possible values as a list or an error message.
Inputs: parameter (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes: retrieving full data, retrieving only a record count, and discovering parameter values. An agent can easily tell which tool to use for each task.
All tool names follow a consistent snake_case get_<object> pattern. The naming is predictable and readable across the entire small tool set.
Three tools are well within the appropriate range for a focused data-query server, and each tool serves a distinct necessary function. There is no obvious redundancy or padding.
The surface covers core data retrieval, counting, and parameter-value discovery, but lacks an explicit way to discover parameter names or datasets before querying. This is a minor gap that a knowledgeable agent can work around.
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Macroeconomic and other official data from 170+ publishers, resolved from natural language with provenance.
Discover, resolve, and query official Brazilian economic data with semantic search and provenance.
Query US Census Bureau data: demographics, economics, and housing statistics.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables natural language queries of U.S. Census Bureau data, translating plain English questions into proper API calls and returning demographic, economic, and housing statistics with proper statistical interpretation and context.320MIT
- FlicenseNot gradedqualityDmaintenanceEnables plain English queries about US agricultural data, including historical crop statistics from NASS QuickStats and current cash grain prices from AMS Market News.-
- AlicenseBqualityBmaintenanceEnables AI assistants to query the full FAOSTAT API for global food and agriculture statistics, allowing natural-language questions about crop production, trade, food security, emissions, and more.23184 PyPI20MIT

mcp-fasofficial
AlicenseNot gradedqualityBmaintenanceEnables access to USDA Foreign Agricultural Service trade and global production data through MCP, supporting natural language queries and tool-based data retrieval.173 npmMIT