mcp_sdk_petstore_api_44
A standalone MCP server generated from an OpenAPI specification that exposes Petstore API endpoints as tools for AI assistants. It utilizes SSE transport to enable models to interact with pet store management functionalities through natural language.
README
mcp_sdk_petstore_api_44 - MCP Server
This is a standalone MCP (Model Context Protocol) server generated from an OpenAPI specification.
What is this?
This package contains everything needed to run an MCP server that exposes API endpoints as tools that can be used by AI assistants like Claude, ChatGPT, and others that support the MCP protocol.
Transport Mode: This server uses SSE (Server-Sent Events) transport - it runs as an HTTP server that MCP clients connect to via a URL.
Prerequisites
- Python 3.10 or higher
- pip (Python package installer)
Quick Start
-
Extract the package:
unzip mcp_sdk_petstore_api_44.zip cd mcp_sdk_petstore_api_44 -
Install dependencies:
pip install -r requirements.txt -
Configure authentication (if your API requires it):
- Edit
config.jsonand update theauth_configsection - See the "Authentication" section below for examples
- Edit
-
Run the server:
python main.py -
Note the MCP URL from the output:
MCP Connection URL: http://localhost:8000/sse -
Connect from your MCP client using this URL
Running the Server
Start the server with:
python main.py
You should see output like:
============================================================
MCP Server is starting...
Server Name: mcp_sdk_petstore_api_44
Tools Available: X
MCP Connection URL:
http://localhost:8000/sse
Health Check:
http://localhost:8000/health
Server will be available at: 0.0.0.0:8000
============================================================
The server will continue running until you press Ctrl+C.
Changing Host/Port
Edit config.json to change the host or port:
{
"host": "0.0.0.0",
"port": 8000
}
0.0.0.0means the server listens on all network interfaces- Use
127.0.0.1orlocalhostto only allow local connections - Change
portto any available port number
Connecting MCP Clients
Using the MCP URL
Your MCP client needs the SSE endpoint URL: http://localhost:8000/sse
Claude Desktop (SSE Mode)
If your Claude Desktop supports SSE transport, add to claude_desktop_config.json:
{
"mcpServers": {
"mcp_sdk_petstore_api_44": {
"url": "http://localhost:8000/sse",
"transport": "sse"
}
}
}
Cursor / Custom MCP Clients
Configure your client to connect to the SSE endpoint:
- URL:
http://localhost:8000/sse - Transport: SSE / Server-Sent Events
- Method: GET (for SSE connection), POST (for messages endpoint at
/messages)
Testing with curl
Verify the server is running:
# Health check
curl http://localhost:8000/health
# Connect to SSE endpoint (will stream events)
curl -N http://localhost:8000/sse
Understanding the Package Structure
config.json
Contains the server configuration:
server_name: The name of your MCP serverbase_url: The base URL of the target API that this MCP server will proxyhost: Server host (default:0.0.0.0)port: Server port (default:8000)auth_config: Authentication configuration for the target API (optional)session_id: Unique identifier for this server instance
tools.json
Contains the tool definitions generated from your OpenAPI specification. These are the endpoints that will be available as tools to AI assistants.
Each tool includes:
name: Unique tool identifierdescription: What the tool doesinputSchema: JSON Schema defining the tool's parametersmetadata: HTTP method, path, and other endpoint details
main.py
The entry point that:
- Loads configuration and tools
- Sets up authentication handler
- Creates the DynamicMCPServer instance
- Starts the HTTP server with SSE endpoints
- Exposes the MCP protocol over HTTP
server.py
Contains the core MCP server logic:
DynamicMCPServer: Main MCP server implementationAPIClient: Handles HTTP requests to your target APIToolExecutor: Executes tools by calling the API client
auth_handler.py
Handles authentication for API calls:
- Supports API Key (header/query), Bearer tokens, Basic auth, OAuth2
- Automatically adds auth headers/params to API requests
Authentication
If your API requires authentication, update the auth_config in config.json:
API Key (Header)
{
"type": "apiKey",
"credentials": {
"location": "header",
"name": "X-API-Key",
"value": "your-api-key-here"
}
}
API Key (Query)
{
"type": "apiKey",
"credentials": {
"location": "query",
"name": "api_key",
"value": "your-api-key-here"
}
}
Bearer Token
{
"type": "http",
"credentials": {
"scheme": "bearer",
"token": "your-bearer-token-here"
}
}
Basic Auth
{
"type": "http",
"credentials": {
"scheme": "basic",
"username": "your-username",
"password": "your-password"
}
}
Frequently Asked Questions
Q: What is the MCP server URL?
A: The MCP server URL is displayed when you start the server:
MCP Connection URL:
http://localhost:8000/sse
By default, it's http://localhost:8000/sse. You can change the host/port in config.json.
Q: How do I know if the server is running?
A: Several ways to check:
- Look at the console output - you'll see the startup message with the URL
- Check the health endpoint:
curl http://localhost:8000/health - View server logs - all requests are logged to the console
- Connect with an MCP client - if it can list/use tools, the server is working
Q: Can I access the server from another machine?
A: Yes! Change the host in config.json:
{
"host": "0.0.0.0",
"port": 8000
}
Then use your machine's IP address or hostname:
- From same network:
http://192.168.1.100:8000/sse - With proper DNS/routing:
http://your-hostname:8000/sse
Security Note: When exposing the server publicly, ensure the target API credentials are properly secured and consider adding authentication to the MCP server itself.
Q: Can multiple clients connect simultaneously?
A: Yes! The server uses SSE transport and can handle multiple concurrent client connections. Each client will have its own session.
Troubleshooting
Import Errors
Make sure you've installed all dependencies:
pip install -r requirements.txt
If using a virtual environment, ensure it's activated before running.
Port Already in Use
If you see an error like Address already in use:
- Change the port in
config.jsonto a different number - Or stop the process using that port:
# Find process using port 8000 lsof -i :8000 # Kill it kill -9 <PID>
Cannot Connect to MCP Server
- Verify the server is running (check console output)
- Test the health endpoint:
curl http://localhost:8000/health - Check firewall settings if connecting from another machine
- Ensure the MCP client is using the correct URL
Connection Issues to Target API
- Verify the
base_urlinconfig.jsonis correct - Check that the target API is accessible from your machine
- Verify authentication credentials if the API requires it
- Test the API endpoints directly with curl to ensure they work
- Check server logs for detailed error messages
Tool Execution Fails
- Check the server console for error messages
- Verify the tool definitions in
tools.jsonmatch the API spec - Ensure the target API endpoint is functioning correctly
- Verify authentication is configured if the API requires it
- Check if required parameters are being passed correctly
Server Crashes or Won't Start
- Check Python version:
python --version(needs 3.10+) - Review error messages in the console
- Ensure
config.jsonandtools.jsonare valid JSON - Try running with verbose logging to see more details
Files Description
main.py: Entry point for the MCP serverserver.py: MCP server implementationauth_handler.py: Authentication handler for API callsconfig.json: Server configurationtools.json: Tool definitions from OpenAPI specrequirements.txt: Python dependenciesREADME.md: This file
Support
For issues or questions:
- Check the logs for error messages
- Verify your configuration in
config.json - Ensure the target API is accessible
Generated
This MCP server was generated on 2026-01-29 12:29:43 using the Integra BYOM platform.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
E2B
Using MCP to run code via e2b.