- Home
- MCP servers
- Petstore
Petstore
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"raghavendraprakash-mcpforrestapis": {
"command": "python3",
"args": [
"petstore-mcp-server.py"
],
"env": {
"YOUR_ENV": "<YOUR_ENV>"
}
}
}
}You can run and use the Petstore MCP Server alongside a powerful MCP client to manage pets, store operations, and users through an agent-friendly interface. This setup lets you execute high-level tasks, test workflows, and integrate AI agents with the Petstore API using a structured MCP server and client.
How to use
You run the MCP server locally and connect to it with the MCP client. The server exposes a full Petstore API surface as MCP endpoints, while the client provides high-level methods and agent-friendly workflows. Start the server, then use the client to perform operations such as adding pets, querying inventory, creating users, placing orders, and authenticating sessions. Use the client to orchestrate complex tasks through agent interfaces, prompts, and workflows.
How to install
Prerequisites: Python 3.x and a working Python virtual environment. You may also need a shell with typical command-line tools.
# 1) Install server dependencies
pip3 install -r requirements.txt
# 2) Make the server executable (optional on some systems)
chmod +x petstore-mcp-server.py
# 3) (Optional) Run the setup script if you prefer a one-shot setup
bash setup.sh
Additional sections
Configuration details are provided for running the server via a local stdio configuration. You can start the MCP server directly with Python and point the MCP configuration to use a local command.
{
"mcpServers": {
"petstore": {
"command": "python3",
"args": ["petstore-mcp-server.py"],
"cwd": "/path/to/petstore",
"env": {}
}
}
}
Security and reliability
The setup emphasizes secure handling of credentials and API keys, encrypted communication, input validation, and robust error handling. Expect automatic retries for transient network issues and clear error messages for invalid requests.
Available tools
add_pet
Add a new pet to the store
update_pet
Update an existing pet
get_pet_by_id
Find pet by ID
find_pets_by_status
Find pets by status (available, pending, sold)
find_pets_by_tags
Find pets by tags
update_pet_with_form
Update a pet using form data
delete_pet
Delete a pet
upload_pet_image
Upload an image for a pet
get_inventory
Get pet inventories by status
place_order
Place an order for a pet
get_order_by_id
Find purchase order by ID
delete_order
Delete purchase order by ID
create_user
Create a new user
create_users_with_list
Create multiple users from a list
login_user
Log user into the system
logout_user
Log out current user session
get_user_by_name
Get user by username
update_user
Update user information
delete_user
Delete a user