# Petfinder MCP

> Petfinder MCP Server gives your AI client direct access to North America's largest database of adoptable pets, shelters, and animal welfare organizations. Your agent can search for specific breeds, filter by location (ZIP code or city), and instantly retrieve full metadata on animals and local rescue groups.

## Overview
- **Category:** artificial-intelligence
- **Price:** Free
- **Tags:** animal-adoption, database-search, shelter-data, pet-metadata, api-integration

## Description

Listen up. This Petfinder MCP Server gives your agent direct access to North America’s biggest database of adoptable pets, shelters, and welfare groups. Forget clicking through fifty different websites trying to find a dog or cat; your agent handles all the searching and data pulling conversationally.

Your agent can start by finding animals near you using `search_nearby_animals`, which pulls up every pet available within a specified radius of any ZIP code or city coordinates. If you don't know where you are, you can always get an initial list of pets that match general criteria with `list_animals`.

Need to narrow it down? You start by figuring out the categories. Your agent uses `list_animal_types` to see every major classification available, like 'Dog' or 'Cat'. After that, if you pick a type, your agent can use `list_breeds` to list all the specific breeds under that group—say, 'Labrador' for 'Dog'.

Once you have a pet in mind from those general searches, you pull up the full file using `get_animal`, which retrieves every piece of metadata and description tied to one unique animal ID. Want to check out local rescues? Your agent can use `list_organizations` to get an initial list of all registered groups. From there, it pulls the complete profile and contact info for any specific shelter using `get_organization`. It's a whole system.

It’s simple: you tell your AI client what you want—a husky near 10001 zip code, or contact details for the local feline rescue. Your agent runs `search_nearby_animals` and then uses `get_animal` to give you every detail on that dog. It's all about precise data retrieval.

## Tools

### get_animal
Retrieves detailed metadata for a specific animal using its unique ID.

### get_organization
Retrieves the full profile and contact information for a specific animal welfare organization.

### get_animal_type
Fetches all details associated with a major animal classification, like 'Dog' or 'Cat'.

### list_animals
Returns an initial list of adoptable animals that match general criteria.

### list_breeds
Lists all recognized breeds under a specified animal type, like 'Labrador' for 'Dog'.

### list_organizations
Provides an initial list of registered pet welfare organizations.

### list_animal_types
Provides a list of all recognized pet classifications available in the database.

### search_nearby_animals
Searches and returns adoptable animals located within a specified radius of a given geographic coordinate or ZIP code.

## Prompt Examples

**Prompt:** 
```
Find adoptable 'Siberian Husky' dogs in New York.
```

**Response:** 
```
I've searched Petfinder for Siberian Huskies in New York. I found 12 dogs, including 'Luna' and 'Rocky', currently available at local shelters. Would you like to see their details?
```

**Prompt:** 
```
Show me animal shelters near ZIP code 90210.
```

**Response:** 
```
Retrieving organizations near Beverly Hills... I've identified 5 active animal welfare groups, including 'LA Animal Services'. I can give you their contact info if you're ready to reach out.
```

**Prompt:** 
```
What are the common color patterns for cats?
```

**Response:** 
```
According to Petfinder's data, common cat color patterns include 'Calico', 'Tabby', 'Tortoiseshell', and 'Point'. I can also list the specific coats recognized for cats if you'd like.
```

## Capabilities

### Search for animals by location
Runs a search to find adoptable pets within a specific radius of any given ZIP code or city using nearby coordinates.

### Retrieve detailed animal profiles
Fetches all metadata, descriptions, and attributes for one specific pet record using an animal ID.

### List available animal types and breeds
Retrieves the full list of recognized animal classifications (like Cat or Dog) and lists specific breeds under a chosen type.

### Find local shelters and organizations
Lists all registered animal welfare groups or retrieves detailed information on one specific organization using its ID.

### List general adoptable animals
Provides a list of pets that are currently available for adoption without needing to specify advanced filters first.

## Use Cases

### A volunteer needs pets for local promotion.
A community coordinator wants to promote available animals in their county. They ask the agent to run `search_nearby_animals` using a central ZIP code. The tool returns 30 specific records, allowing the coordinator to instantly compile a list of dogs and cats they can focus on promoting that week.

### A vet needs breed data for client education.
A tech is speaking with an owner about their Pitbull mix. The agent uses `get_animal` (if the pet has a profile) or cross-references the type using `get_animal_type` to pull up recognized traits and care instructions, making the conversation authoritative.

### A researcher is auditing shelter capacity.
A data scientist needs to know how many rescues exist in three different states. They use `list_organizations` for a general list, then loop through it calling `get_organization` on each result to aggregate operational status and contact details.

### An adopter wants only specific breeds.
A family is looking for an active cat. They ask the agent to find all 'Siamese' cats in their city. The agent uses `list_breeds` to confirm 'Siamese' is valid, then calls a filtered search (like `list_animals`) that applies the breed and location filters simultaneously.

## Benefits

- Finding a pet in your area is fast. Instead of manual searches, use `search_nearby_animals` to pinpoint available animals based on any ZIP code you input.
- You get deep data instantly. Running `get_animal` pulls all the required metadata—temperament, history, and specific needs—for one pet without leaving your client.
- Researching shelters is straightforward. Call `list_organizations` to see which groups exist in a region, then use `get_organization` for their full contact info.
- Classification is easy. Use `list_animal_types` first to understand the available categories; then call `list_breeds` to narrow down specific types like 'Border Collie'.
- The process of finding an animal becomes a single query. Combining `list_animals` with location parameters cuts out multiple manual search steps.

## How It Works

The bottom line is: you get clean, actionable pet adoption data directly in your client's workspace, instead of wading through a website.

1. Subscribe to the Petfinder server and input your API Key/Secret.
2. Your AI client sends a natural language request (e.g., 'Find husky dogs near 90210').
3. The agent translates this into tool calls, running `search_nearby_animals` or `list_animals`, and returns structured JSON data.

## Frequently Asked Questions

**How do I find dogs near me using search_nearby_animals?**
You give the agent your desired location (ZIP code or city). The tool runs `search_nearby_animals`, returning a list of pets and their IDs available in that specific radius.

**Do I need to run list_animal_types before listing breeds?**
No. While `list_animal_types` shows you what's possible, you can usually move straight to using `list_breeds` by specifying the type in your initial prompt.

**What is the difference between list_animals and search_nearby_animals?**
`list_animals` gives a general list of adoptable pets. `search_nearby_animals` adds crucial geographical filtering, making its results specific to a location.

**Can I get an organization's contact info using get_organization?**
Yes. If you know the ID, running `get_organization` provides all the necessary operational details and contact information for that welfare group.

**What credentials do I need to run the `list_animals` function?**
You must provide a Petfinder API Key and an API Secret. These keys are required for all calls, including listing animals. Always store these credentials securely in your agent's environment variables.

**If I run `list_organizations` too frequently, is there a rate limit?**
Yes, the API enforces standard usage limits to maintain service stability. Hitting this ceiling triggers a 429 error. Your agent should implement exponential backoff logic when handling these failures.

**Can I filter results from `get_animal` by specific metadata fields like color pattern?**
Absolutely. You can pass structured criteria to narrow the search before fetching full details. For instance, you might limit results to only 'Calico' or animals marked as 'Neutered'.

**If I use `get_animal_type` with an invalid type ID, what error code should my agent expect?**
You should anticipate a 400 Bad Request. The API requires valid IDs for the specified field. Your client needs to check the response body for specific validation messages rather than just failing.

**Can I search for specific breeds like 'Golden Retriever' near my ZIP code?**
Yes! Use the `list_animals` tool, provide 'Golden Retriever' in the `breed` parameter and your ZIP code in the `location` parameter. Your agent will find all matching dogs in your area.

**How do I get the contact information for a shelter that has a pet I'm interested in?**
Every animal record returned by `get_animal` includes an `organization_id`. Use the `get_organization` tool with that ID to retrieve the shelter's full address, phone number, and email.

**Is there a limit to the search radius?**
Yes, Petfinder supports a search radius up to 500 miles from the provided location. You can specify the distance using the `search_nearby_animals` tool.