home / mcp / giphy mcp server

Giphy MCP Server

An implementation of Giphy integration with Model Context Protocol

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "magarcia-mcp-server-giphy": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-giphy"
      ],
      "env": {
        "GIPHY_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

You can run a dedicated MCP server that exposes Giphy GIFs to AI models. It fetches, filters, and formats GIF data with full metadata so your models can search, retrieve, and incorporate GIFs efficiently while respecting content ratings and pagination.

How to use

You interact with the Giphy MCP Server through an MCP-enabled client. Use the available tools to search for GIFs, fetch a random GIF, or retrieve trending GIFs. Each GIF entry includes essential metadata such as the image formats, dimensions, and attribution. Apply content rating filters (G, PG, PG-13, R) to ensure content suitability. Use the tools to build AI-assisted workflows that require visual media from Giphy without exposing raw web pages.

How to install

Prerequisites you need before installation: a runtime environment that supports Node.js and npm. Ensure you have Node.js and npm installed on your system.

Steps to install and run

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

# Run in development mode with hot reloading
npm run dev

# Run tests
npm test

# Use with MCP Inspector
npm run inspector

Note: To use the server with an MCP client like Claude Desktop, you can configure an MCP connection that runs the server via npx and passes your API key as an environment variable. The example below shows how to configure the client to start the MCP using the package name and a key placeholder.

Configuration and environment

Create a GIPHY API key by signing up as a Giphy Developer and creating an app to obtain the key. Then place the key in your environment or a configuration file as shown.

Usage example with Claude Desktop

json
{
  "mcpServers": {
    "giphy": {
      "command": "npx",
      "args": ["-y", "mcp-server-giphy"],
      "env": {
        "GIPHY_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Environment setup file

GIPHY_API_KEY=your_api_key_here

Additional notes

The server provides three core tools for interacting with GIF data. Use these through your MCP client to build richer media-enabled AI experiences. Remember to keep your API key secure and avoid exposing it in client-side code.

Available tools

search_gifs

Search GIFs on Giphy with a query string, returning an array of GIF objects with metadata. Supports limit, offset, rating, and language filters.

get_random_gif

Retrieve a random GIF, with optional tag filtering and content rating. Returns a random GIF object with full metadata.

get_trending_gifs

Fetch currently trending GIFs with optional limit, offset, and rating filters. Returns an array of GIF objects with metadata.