MCP HubMCP Hub
glifxyz

glif-mcp-server

by: glifxyz

Easily run glif.app AI workflows inside your LLM: image generators, memes, selfies, and more. Glif supports all major multimedia AI models inside one app

17created 15/02/2025
Visit
AI
multimedia

📌Overview

Purpose: The glif-mcp framework aims to facilitate the running of AI workflows seamlessly through the glif application.

Overview: glif-mcp serves as a server that enables users to run glifs, access detailed information about glifs, and manage user data. It is designed to be set up both locally and remotely, providing flexibility in usage and deployment for AI tasks.

Key Features:

  • Run glifs with inputs: Allows users to execute glifs while providing necessary input data, thereby enabling the execution of complex AI workflows.

  • Get detailed information about glifs, runs, and users: Users can retrieve metadata about glifs, execution runs, and user profiles, ensuring comprehensive management and insights into their operations.

  • Access glif metadata through URI-based resources: Users can easily obtain glif metadata using specific URIs, streamlining the process of accessing important data related to their AI workflows.


glif-mcp-server

MCP server for running AI workflows from glif.app.

This server provides tools for running glifs, managing bots, and accessing glif metadata through the Model Context Protocol (MCP).

It also allows for customizing all the tools available via add-tool, remove-tool, etc meta-tools, including running full glif agents as a set of tools (and personality). This feature is highly experimental.

For more info, visit https://glif.app or join the Discord server: https://discord.gg/glif

Features

  • Run glifs with inputs
  • Get detailed information about glifs, runs, and users
  • Access glif metadata through URI-based resources

Setup

Running via npx (recommended)

If you have nodejs installed, you can run the @glifxyz/glif-mcp-server package via npx:

  1. Get your API token from https://glif.app/settings/api-tokens
  2. Add the server in your Claude Desktop config file. On macOS this is: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "glif": {
      "command": "npx",
      "args": ["-y", "@glifxyz/glif-mcp-server@latest"],
      "env": {
        "GLIF_API_TOKEN": "your-token-here"
      }
    }
  }
}

Running from a local checkout

First, checkout this code and install dependencies.

git clone https://github.com/glifxyz/glif-mcp-server
cd glif-mcp-server
npm install
npm run build
# build/index.js is the entry point to run

Configure your MCP client (e.g. Claude Desktop) to load this server from disk:

{
  "mcpServers": {
    "glif": {
      "command": "node",
      "args": ["/path/to/glif-mcp/build/index.js"],
      "env": {
        "GLIF_API_TOKEN": "your-token-here"
      }
    }
  }
}

You can specify glif IDs (comma-separated) to be loaded automatically on server start:

{
  "mcpServers": {
    "glif": {
      "command": "node",
      "args": ["/path/to/glif-mcp/build/index.js"],
      "env": {
        "GLIF_API_TOKEN": "your-token-here",
        "GLIF_IDS": "cm2v9aiga00008vfqdiximl2m,cm2v98jk6000r11afslqvooil,cm2v9rp66000bat9wr606qq6o",
        "IGNORE_SAVED_GLIFS": true
      }
    }
  }
}

Run remotely with Smithery

To install glif-mcp for Claude Desktop automatically via Smithery, which hosts and runs the MCP server for you:

npx -y @smithery/cli install @glifxyz/glif-mcp-server --client claude

Usage Limits

Resources

  • glif://{id} - Get glif metadata
  • glifRun://{id} - Get run details
  • glifUser://{id} - Get user profile

Tools

General Glif Tools

  • run_glif - Run a glif with the specified ID and inputs
  • glif_info - Get detailed information about a glif including input fields
  • list_featured_glifs - Get a curated list of featured glifs
  • search_glifs - Search for glifs by name or description

Bot Tools

  • list_bots - Get a list of featured bots and sim templates
  • load_bot - Get detailed information about a specific bot, including its skills
  • save_bot_skills_as_tools - Save all skills from a bot as individual tools

User-specific Tools

  • my_glifs - Get a list of your glifs
  • my_glif_user_info - Get detailed information about your user account, recent glifs, and recent runs

Glif→Tool Tools (metatools)

  • save_glif_as_tool - Save a glif as a custom tool
  • remove_glif_tool - Remove a saved glif tool
  • remove_all_glif_tools - Remove all saved glif tools and return to a pristine state
  • list_saved_glif_tools - List all saved glif tools

How to turn glifs into custom tools

The general run_glif tool is functional but not very descriptive, requiring a glif_info call beforehand to understand how to use it, and prior knowledge of the glif.

We are experimenting with meta-tools that turn specific glifs into new standalone tools. For example:

  • Query featured glifs
  • Save a selected glif as a tool with a custom name
  • Use the new tool directly by name

You can list these special tools with list_saved_glif_tools and remove unwanted ones with remove_glif_tool.

Note: Claude Desktop requires a restart to load new tool definitions. Cline & Cursor reload automatically and refresh available tools on changes.

Auth user info tools:

  • my_glifs - Current user's published glifs
  • my_liked_glifs - Current user's liked glifs
  • my_runs - Current user's public runs

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run dev

Run the test suite:

npm run test

Continuously run tests on changes:

npm run test:watch

Debugging

MCP servers communicate over stdio, making debugging challenging. Use the MCP Inspector:

npm run inspector

This provides a URL to access debugging tools in your browser. You can also find glif-mcp logs inside Claude logs if using Claude Desktop.

MCP registries

smithery badge

Releasing a new version

  1. Edit package.json and src/index.ts to bump the version number
  2. Run npm install to update the lockfile
  3. Commit and push changes to GitHub and merge to main
  4. If using gh CLI, on main run npm run release to create and push a git tag and publish a new release with an autogenerated changelog. Otherwise, create the release manually on GitHub.
  5. A GitHub Action will publish the package to NPM using the NPM_TOKEN secret

License

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