Skip to content

A Model Context Protocol (MCP) server to interact with the Freepik.com API.- Un serveur MCP (Model Context Protocol) pour interagir avec l'API de Freepik.com.

License

Notifications You must be signed in to change notification settings

Toos00/freepik-mcp-server

Repository files navigation

Freepik MCP Server

Python Package License: MIT Python 3.10+ MCP

Version française

An MCP (Model Context Protocol) server for interacting with the Freepik.com API.

Prerequisites

  • Python 3.10 or higher
  • Freepik API key

Installation

  1. Clone this repository
  2. Install dependencies:
    pip install -e .

Configuration

  1. Obtain an API key from Freepik
  2. Set the environment variable:
    export FREEPIK_API_KEY="your_api_key"

Usage

Start the MCP server:

python -m freepik_mcp_server.server

The server exposes the following tools:

search_images

Search for images on Freepik.

Parameters:

  • query (required): Search term
  • page: Page number (default: 1)
  • limit: Results per page (default: 20, max: 100)
  • orientation: Image orientation (landscape, portrait, square)
  • color: Dominant color filter

get_image_details

Get details of a specific image.

Parameters:

  • id (required): Freepik image ID

search_vectors

Search for vector graphics on Freepik.

Parameters:

  • query (required): Search term
  • page: Page number (default: 1)
  • limit: Results per page (default: 20, max: 100)
  • orientation: Vector orientation (landscape, portrait, square)

Integration with Claude Desktop

Add this configuration to your Claude Desktop config file:

{
  "mcpServers": {
    "freepik": {
      "command": "python",
      "args": ["-m", "freepik_mcp_server.server"],
      "env": {
        "FREEPIK_API_KEY": "your_api_key"
      }
    }
  }
}

Development

Development Installation

pip install -e ".[dev]"

Running Tests

pytest

Linting

flake8 src tests

Project Structure

freepik-mcp-server/
├── src/
│   └── freepik_mcp_server/
│       ├── __init__.py
│       └── server.py
├── tests/
│   └── test_server.py
├── .github/
│   └── workflows/
│       └── python-package.yml
├── .gitignore
├── LICENSE
├── README.md
├── README_FR.md
├── pyproject.toml
└── requirements.txt

Features

  • Advanced image search with filters
  • Vector graphics search
  • Retrieve specific image details
  • Error handling and logging
  • Automated testing
  • GitHub Actions CI/CD

Freepik API Limitations

  • Request limits depend on your subscription plan
  • Some features require a premium account
  • Results may vary by region

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Model Context Protocol (MCP) server to interact with the Freepik.com API.- Un serveur MCP (Model Context Protocol) pour interagir avec l'API de Freepik.com.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages