Gravatar

by automattic

Not rated
GitHub

About

Interact with Gravatar avatars, profiles, and inferred interests.

Details

Author
automattic
Categories
Cloud Service, API, Security, Other
Tags
#social-media

Setup

Install Gravatar in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/automattic/mcp-server-gravatar

Follow the installation instructions in the repository README, then restart your MCP client.

Gravatar's official MCP Server, enabling access to avatars, profiles, and inferred interests.

For quick installation in VS Code, click one of the installation buttons below:

- Node.js: 20.0.0 or higher
- npm: 10.0.0 or higher

- Node.js 20 (Active LTS)
- Node.js 22 (Current LTS)
- Node.js 24 (Current)

You can install and run this server using npx (recommended) or by building from source.

- Retrieve comprehensive Gravatar profile information using a profile identifier
- Required inputs:

- profileIdentifier(string): A Profile Identifier (seeIdentifier Typessection)

- Retrieve comprehensive Gravatar profile information using an email address
- Required inputs:

- email(string): The email address associated with the Gravatar profile. Can be any valid email format - the system will automatically normalize and hash the email for lookup.

- Fetch AI-inferred interests for a Gravatar profile using a profile identifier
- Required inputs:

- profileIdentifier(string): A Profile Identifier (seeIdentifier Typessection)

- Fetch AI-inferred interests for a Gravatar profile using an email address
- Required inputs:

- email(string): The email address associated with the Gravatar profile. Can be any valid email format - the system will automatically normalize and hash the email for lookup.

- Retrieve the avatar image for a Gravatar profile using an avatar identifier
- Required inputs:

- avatarIdentifier(string): An Avatar Identifier (seeIdentifier Typessection)

- size(number, default: undefined): Desired avatar size in pixels (1-2048). Images are square, so this sets both width and height. Common sizes: 80 (default web), 200 (high-res web), 512 (large displays).
- defaultOption(string, default: undefined): Fallback image style when no avatar exists. Options: '404' (return HTTP 404 error instead of image), 'mp' (mystery person silhouette), 'identicon' (geometric pattern), 'monsterid' (generated monster), 'wavatar' (generated face), 'retro' (8-bit style), 'robohash' (robot), 'blank' (transparent).
- forceDefault(boolean, default: undefined): When true, always returns the default image instead of the user's avatar. Useful for testing default options or ensuring consistent placeholder images.
- rating(string, default: undefined): Maximum content rating to display. 'G' (general audiences), 'PG' (parental guidance), 'R' (restricted), 'X' (explicit). If user's avatar exceeds this rating, the default image is shown instead.

- Retrieve the avatar image for a Gravatar profile using an email address
- Required inputs:

- email(string): The email address associated with the Gravatar profile. Can be any valid email format - the system will automatically normalize and hash the email for lookup.

- size(number, default: undefined): Desired avatar size in pixels (1-2048). Images are square, so this sets both width and height. Common sizes: 80 (default web), 200 (high-res web), 512 (large displays).
- defaultOption(string, default: undefined): Fallback image style when no avatar exists. Options: '404' (return HTTP 404 error instead of image), 'mp' (mystery person silhouette), 'identicon' (geometric pattern), 'monsterid' (generated monster), 'wavatar' (generated face), 'retro' (8-bit style), 'robohash' (robot), 'blank' (transparent).
- forceDefault(boolean, default: undefined): When true, always returns the default image instead of the user's avatar. Useful for testing default options or ensuring consistent placeholder images.
- rating(string, default: undefined): Maximum content rating to display. 'G' (general audiences), 'PG' (parental guidance), 'R' (restricted), 'X' (explicit). If user's avatar exceeds this rating, the default image is shown instead.

- 404: Return an HTTP 404 error instead of an image when no avatar exists
- mp: (mystery-person) A simple, cartoon-style silhouetted outline of a person
- identicon: A geometric pattern based on an email hash
- monsterid: A generated 'monster' with different colors, faces, etc
- wavatar: Generated faces with differing features and backgrounds
- retro: Awesome generated, 8-bit arcade-style pixelated faces
- robohash: A generated robot with different colors, faces, etc
- blank: A transparent PNG image

- G: Suitable for display on all websites with any audience type
- PG: May contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence
- R: May contain harsh profanity, intense violence, nudity, or hard drug use
- X: May contain sexual imagery or extremely disturbing violence

Some parts of the Gravatar API can be used without authentication. However, using an API key is recommended as it increases the rate limits for your queries. You can generate your own API key by visiting theDeveloper Dashboard.

Once you have your API key, you can configure it in Claude Desktop or VS Code as shown in the sections below.

Add the following to yourclaude_desktop_config.json:

{ "mcpServers": { "gravatar": { "command": "npx", "args": [ "-y", "@automattic/mcp-server-gravatar" ], "env": { "GRAVATAR_API_KEY": "your-api-key-here" } } } }

- Without an API key, strict rate limits will be applied.
- A future release of this server may include tools that will only be available with an API key.

{ "mcpServers": { "gravatar": { "command": "npx", "args": [ "-y", "@automattic/mcp-server-gravatar" ] } } }

For manual installation, add one of the following JSON blocks to your User Settings (JSON) file in VS Code. You can do this by pressingCmd + Shift + P(orCtrl + Shift + Pon Windows/Linux) and typingPreferences: Open Settings (JSON).

This configuration prompts for an API key and stores it securely:

{ "mcp": { "inputs": [ { "type": "promptString", "id": "gravatar_api_key", "description": "Gravatar API Key (optional)", "password": true } ], "servers": { "gravatar": { "command": "npx", "args": ["-y", "@automattic/mcp-server-gravatar"], "env": { "GRAVATAR_API_KEY": "${input:gravatar_api_key}" } } } } }

- Without an API key, strict rate limits will be applied.
- A future release of this server may include tools that will only be available with an API key.

{ "mcp": { "servers": { "gravatar": { "command": "npx", "args": ["-y", "@automattic/mcp-server-gravatar"] } } } }

Optionally, you can add either configuration to a file called.vscode/mcp.jsonin your workspace. This will allow you to share the configuration with others.

Note that themcpkey is not needed in the.vscode/mcp.jsonfile.

If you want to build and run the MCP server from local source files:

# Clone the repository git clone https://github.com/Automattic/mcp-server-gravatar.git cd mcp-server-gravatar # Install dependencies npm install

The update your MCP Client configuration:

{ "mcpServers": { "gravatar": { "command": "npx", "args": [ "/path/to/mcp-server-gravatar" ], "env": { "GRAVATAR_API_KEY": "your-api-key-here" } } } }
{ "mcpServers": { "gravatar": { "command": "npx", "args": [ "/path/to/mcp-server-gravatar" ] } } }

The Gravatar MCP server uses different types of identifiers to access profile and avatar data:

AProfile Identifiercan be one of the following:
- SHA256 Hash(preferred): An email address that has been normalized (lower-cased and trimmed) and then hashed with SHA256
- MD5 Hash(deprecated): An email address that has been normalized (lower-cased and trimmed) and then hashed with MD5
- URL Slug: The username portion from a Gravatar profile URL (e.g., 'username' from gravatar.com/username)

AnAvatar Identifieris an email address that has been normalized (lower-cased and trimmed) and then hashed with either:

Important: Unlike Profile Identifiers, Avatar Identifiers cannot use URL slugs - only email hashes are supported.

When using email-based tools, you can provide any valid email format. The system will automatically:
- Normalize the email (convert to lowercase and trim whitespace)
- Generate the appropriate hash for API requests
- Process the email securely without storing it

The MCP Inspector is a tool that helps validate your MCP server implementation. To run the inspector:

This will build the project and then run the MCP Inspector against your server, validating the tools and their schemas.

Start the TypeScript compiler in watch mode:

This will watch for changes to your TypeScript files and automatically recompile them.

This project is tested against multiple Node.js versions to ensure compatibility. The CI pipeline automatically tests on:

- Node.js 20(Active LTS)
- Node.js 22(Current LTS)
- Node.js 24(Current)

To test locally with different Node versions using nvm:

# Test with Node 20 nvm use 20 npm ci npm run type-check npm test # Test with Node 22 nvm use 22 npm ci npm run type-check npm test # Test with Node 24 nvm use 24 npm ci npm run type-check npm test

This project uses aMake-driven architecturefor all code generation with proper file-based dependencies:

# Generate everything (API client + MCP schemas) make generate-all # OR npm run generate-all # Generate just the OpenAPI client make generate-client # OR npm run generate-client # Generate just the MCP schemas (requires client) make generate-schemas # OR npm run generate-schemas

The schema generation is configured viascripts/schemas.config.jsonand supports:

- Configurable schema extractionfrom OpenAPI models
- Array wrappingfor responses that need structured containers
- Clean output schemasthat match MCP specification exactly
- Automatic dependency trackingvia Make

The project includes a Makefile with several useful commands:

- make download-spec: Download the Gravatar OpenAPI spec
- make generate-client: Generate Gravatar API client from OpenAPI spec
- make generate-schemas: Generate MCP output schemas from API client
- make generate-all: Generate API client and MCP schemas
- make build: Build the TypeScript project
- make lint: Run linting
- make lint-fix: Run linting with auto-fix
- make format: Format code with Prettier
- make format-check: Check code formatting
- make quality-check: Run linting and format checking
- make clean: Clean build artifacts and dependencies

Runmake helpto see all available commands.

-

GRAVATAR_API_KEY: Optional API key for Gravatar API. If provided, it will be used for API requests, which increases rate limits and provides access to additional features.

GRAVATAR_API_KEY_ENV_VAR: Optional name of the environment variable that contains the API key. Default isGRAVATAR_API_KEY. This is useful if you need to use a different environment variable name in your deployment environment.

When running the server locally, you can set these environment variables in your shell before starting the server:

# Set API key (recommended) export GRAVATAR_API_KEY=your_api_key_here # Start the server npm start

Or you can provide them inline when starting the server:

GRAVATAR_API_KEY=your_api_key_here npm start

When configuring the server in Claude Desktop or VS Code, you can set these environment variables in the configuration as shown in the Setup section above.

This MCP server is licensed under the Mozilla Public License Version 2.0 (MPL-2.0). This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MPL-2.0. For more details, please see theLICENSEfile in the project repository.

A read-only MCP server that allows LLMs to query live PingOne data. Requires a separate CData JDBC Driver for PingOne.

Interact with Descope's Management APIs to search and retrieve project information.

Administer Keycloak users and realms using a Model Context Protocol server.

A server for comprehensive KYC verification using the SurePass API, supporting document verification, OCR, and face verification.

A server for the Microsoft Graph and Azure RM APIs to manage Azure and Microsoft 365 tenants with AI.

Interact with Facebook and Instagram advertising data using the Meta Marketing API.

A RESTful API to programmatically interact with the Opal Security platform.

Integrates with the Uberall API to manage business listings, locations, and social media presence.

Zernio is a social media scheduling platform that lets you manage and publish content across all major platforms from a single API

Identity infrastructure for the AI economy. 33-trait psychometric engine — belonging probability, trait vectors, attunement depth. Remote streamable-HTTP. Free tier: 16 tools, 10 req/min.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.