scenario.com-mcp-server
The Scenario.com MCP Server is designed to work with the Scenario.com API, enabling image generation and background removal. It provides tools and methods to interface with the API, offering examples and scripts for ease of use.
Scenario.com MCP Server
This project provides a Model Context Protocol (MCP) server to interface with the Scenario.com API. It facilitates generating images from text prompts and removing backgrounds using the platform. The repository structure includes core files in src/
, examples, utility scripts, and tests.
Setup
- Clone the repository.
- Optionally set up a virtual environment.
- Install dependencies using
requirements.txt
orsetup.py
. - Configure a
.env
file with API credentials. - Install the MCP SDK and python-dotenv.
Running the Server
Run the server using different methods such as python src/server.py
or mcp dev
. Use provided scripts for convenience.
Available MCP Tools
- generate_image: Create images from text prompts with optional parameters.
- remove_background: Remove backgrounds from images using asset IDs.
Using the Examples
Refer to examples/client_example.py
for usage examples. Use provided scripts to run examples or tests.
Troubleshooting
Includes common solutions for server start issues and API errors.