glif mcp server
Run AI workflows hosted on Glif.app via MCP, including ComfyUI-based image generators, meme generators, selfies, chained LLM calls, and more
Run AI workflows hosted on Glif.app via MCP, including ComfyUI-based image generators, meme generators, selfies, chained LLM calls, and more
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).
This server also allows for customizing all the tools available via add-tool, remove-tool etc meta-tools, including lot full glif agents as a set of tools (and personality). This is highly experimental.
For more info check out https://glif.app or join our Discord server: https://discord.gg/glif
First, checkout this code and install dependencies. This assumes you have a recent-ish version of Nodejs:
git clone https://github.com/glifxyz/glif-mcp-server
cd glif-mcp-server
npm install
npm run build
# there's now a build/index.js file which is what we'll run next
Then configure your MCP client (e.g. Claude Desktop) to load this server
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"glif": {
"command": "node",
"args": ["/path/to/glif-mcp/build/index.js"],
"env": {
"GLIF_API_TOKEN": "your-token-here"
}
}
}
}
You can also specify glifs IDs (comma-separated) which will be loaded automatically when the server starts. This is useful for testing or if you want to share a pre-made glif configuration with someone else.
{
"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,
}
}
}
}
### Install and run remotely with Smithery
To install glif-mcp for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@glifxyz/glif-mcp-server),
which hosts and runs the MCP server for you:
```bash
npx -y @smithery/cli install @glifxyz/glif-mcp-server --client claude
glif://{id}
- Get glif metadataglifRun://{id}
- Get run detailsglifUser://{id}
- Get user profilerun_glif
- Run a glif with the specified ID and inputsglif_info
- Get detailed information about a glif including input fieldslist_featured_glifs
- Get a curated list of featured glifssearch_glifs
- Search for glifs by name or descriptionlist_bots
- Get a list of featured bots and sim templatesload_bot
- Get detailed information about a specific bot, including its skillssave_bot_skills_as_tools
- Save all skills from a bot as individual toolsmy_glifs
- Get a list of your glifsmy_glif_user_info
- Get detailed information about your user account, recent glifs, and recent runssave_glif_as_tool
- Save a glif as a custom toolremove_glif_tool
- Remove a saved glif toolremove_all_glif_tools
- Remove all saved glif tools and return to a pristine statelist_saved_glif_tools
- List all saved glif toolsWe have a general run_glif
tool, but it (a) isn't very descriptive, and (b) requires doing a glif_info
call first in order to learn how to call said glif. Plus, you need to know that glif exists.
We're experimenting with several new meta-tools which turn specific glifs into new standalone tools:
An example prompt session:
list_featured_glifs
...]save_glif_as_tool glifId=... toolName=scifi_book_image
]You can list these special tools with list_saved_glif_tools
and remove any you Do not like with remove_glif_tool
Note that Claude Desktop requires a restart to load new tool definitions. Cline & Cursor seem to reload automatically on changes and requery for available tools
Info about authenticated User is glifs:
my_glifs
- current User is published glifs (no drats)my_liked_glifs
- current User is liked glifsmy_runs
- current User is public runsInstall dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
To run the test suite:
npm run test
And to continuously run tests on changes:
npm run test:watch
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
You can also look at the glif-mcp logs inside the Claude logs directy if you're using Claude Desktop.
This project is licensed under the MIT License - see the LICENSE file for details.
[
{
"description": "Run a glif with the specified ID and inputs",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the glif to run",
"type": "string"
},
"inputs": {
"description": "Array of input values for the glif",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"id",
"inputs"
],
"type": "object"
},
"name": "run_glif"
},
{
"description": "Get a curated list of featured glifs",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "list_featured_glifs"
},
{
"description": "Get detailed information about a glif including input fields",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the glif to show details for",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "glif_info"
},
{
"description": "Get a list of your glifs",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "my_glifs"
},
{
"description": "Get detailed information about your user account, recent glifs, and recent runs",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "my_glif_user_info"
}
]