Petclinic is an MCP server that connects large language models to the Swagger Petstore API using Petclinic endpoints. Built in Python, it allows developers and testing teams to expose sample e-commerce and veterinary store REST capabilities directly to MCP clients and AI agents. By wrapping Petstore endpoints into standardized Model Context Protocol tools, it enables AI assistants to query Petclinic inventory without manually structuring raw HTTP requests. Users can inspect pet statuses such as available, pending, or sold directly from chat interfaces. The server supports multiple transport modes, including standard input/output for local execution and Server-Sent Events for remote cloud hosting like Cloud Foundry. Petclinic serves as a functional reference implementation for teams exploring how to bridge RESTful web services, API documentation environments, and autonomous LLM agents.
Category: CRM, ERP & E-commerce
Tags: ecommerce, petstore, rest, swagger
uv package manager are installed on your system. 2. Clone the repository and initialize the project: bash uv init uv venv source .venv/bin/activate uv add mcp httpx 3. To use local stdio transport, update petclinic_mcp_server.py line 39 to use mcp.run(transport='stdio'). 4. Open your claude_desktop_config.json file and register the server under the mcpServers object: json { "mcpServers": { "research": { "command": "/{your-uv-install-path}/uv", "args": [ "--directory", "/{your-project-path}/petclinic-mcp/", "run", "petclinic_mcp_server.py" ] } } } 5. Save the configuration and restart Claude Desktop.Part of MCP Servers
Petclinic is a Python-based Model Context Protocol server that interfaces with the Swagger Petstore API. It exposes pet clinic and inventory endpoints as structured tools that AI assistants can invoke directly during chat sessions.
The server exposes the fetch_petsByStatus tool. This tool allows connected language models to retrieve pet records filtered by status values including available, pending, or sold from the Petstore service.
Petclinic supports both stdio and Server-Sent Events transports. The stdio mode is recommended for local clients like Claude Desktop, while SSE is suited for remote deployments such as hosting on Cloud Foundry.
Petclinic works with MCP-compliant clients including Claude Desktop, the official MCP Inspector, and custom AI chat applications that consume tools via stdio or Server-Sent Events connections.