Skip to main content
Glama
nikhil2005verma

Amazon & Flipkart MCP Server

README.md
# Amazon & Flipkart MCP Server

Lightweight MCP (Marketplace Content Proxy) server and tools for interacting with Amazon and Flipkart search/auth components. This repository contains a small service, utilities, and tests used during development.

## Repository layout

- `main.py` — top-level entry (project wrapper).
- `pyproject.toml` — top-level packaging metadata.
- `amazon_flipkart_mcp(1)/amazon_flipkart_mcp/` — primary package directory containing the service and modules:
	- `config.py` — configuration and settings.
	- `server.py` — MCP server entrypoint (HTTP/service glue).
	- `main.py` — package-level runner.
	- `models.py` — shared data models and DTOs.
	- `tools.py` — helper CLIs and utilities used in development.
	- `utils.py` — miscellaneous helper functions.
	- `requirements.txt` — Python dependencies for the package (if present).
	- `amazon/` — Amazon-specific code:
		- `auth.py` — authentication helpers for Amazon.
		- `search.py` — search-related code for Amazon.
	- `flipkart/` — Flipkart-specific code:
		- `search.py` — search-related code for Flipkart.
	- `logs/` — runtime logs (gitignored in most setups).
	- `tests/` — unit tests:
		- `test_amazon_auth.py`, `test_amazon_search.py`, `test_flipkart_search.py`, `test_tools.py`.

## Requirements

- Python 3.10+ recommended.
- Install dependencies (inside the package folder):

```bash
cd amazon_flipkart_mcp(1)/amazon_flipkart_mcp
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```

If the project uses `pyproject.toml` for dependency management, use your preferred tool (`pip`, `poetry`, etc.).

## Configuration

Edit `config.py` to set API keys, timeouts, or other environment-specific settings. The project expects any secrets or credentials to be provided via environment variables or the local `config.py` during development.

## Running the server (development)

From the package directory run the development server. An example command used during development is:

```bash
cd amazon_flipkart_mcp(1)/amazon_flipkart_mcp
uv run fastmcp dev inspector server.py
```

Adjust the command to match your development runner (for example `uvicorn`, `python -m` or a custom `uv` wrapper used in this repo).

## Running tests

Run tests from the package directory:

```bash
cd amazon_flipkart_mcp(1)/amazon_flipkart_mcp
pytest -q
```

## Development notes

- The `amazon` and `flipkart` subpackages contain marketplace-specific logic — split concerns between authentication and search.
- Use `tools.py` for developer convenience functions and test scaffolding.
- Keep secrets out of source control; prefer environment variables for keys.

## Contributing

Feel free to open issues or pull requests. For local changes, add tests in the `tests/` folder and run `pytest`.

## License

Add a license file if you intend to publish this repository. By default, no license is included.

Maintenance

ActivitySlowing
ResponsivenessNo issues