cosmos-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cosmos-mcpsearch for brutalist architecture and save the top 5 to a new collection called 'Brutalism'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cosmos-mcp
Build moodboards with an AI agent. cosmos-mcp is an unofficial Model Context Protocol server for cosmos.so, the visual discovery site. It lets Claude, Cursor and any other MCP client search Cosmos, find similar images, and save collections to your account.
Search and browsing need no setup. You add a token only when you want to save.
One command for Claude Code:
claude mcp add cosmos -- npx -y cosmos-mcpUnofficial. Not affiliated with Cosmos.
Read this before you install:
Cosmos publishes no API. This server calls the same private GraphQL endpoint the cosmos.so web app uses. Cosmos can change or remove that endpoint at any time, and this server will break when it does.
Write access reuses your own browser session token (the
Authorizationheader). There is no OAuth and no scoping: the token can do everything your account can.You are responsible for the cosmos.so Terms of Service. Use your own account and your own data. Do not scrape.
Use at your own risk, including the risk of account restrictions. The LICENSE gives no warranty.
Related MCP server: pinterest-vision-mcp
What it does
On Cosmos, people save images, videos and products. Each saved item is an element. Elements are grouped into collections, which can nest. Cosmos calls a collection a cluster in its API, so the tool names use that word; this page says "collection".
The server gives an agent tools for that model. In one turn, an agent can:
Search Cosmos for "warm brutalist interiors".
Find images that look like the best result.
Look at each image and reject the weak ones.
Create a collection and save the keepers.
You describe what you want. The agent builds the moodboard.
It suits three jobs:
Research: find reference for a brief without clicking through a site.
Curation: sort saved work into collections and move elements between them.
Discovery: start from one image you like and find more like it.
Install
For Claude Code:
claude mcp add cosmos -- npx -y cosmos-mcpAdd -e COSMOS_AUTHORIZATION="Bearer paste_your_token_here" to enable the write tools, or run npx cosmos-mcp login later (see Authentication).
Every other client uses the same JSON config:
{
"mcpServers": {
"cosmos": {
"command": "npx",
"args": ["-y", "cosmos-mcp"],
"env": {
"COSMOS_AUTHORIZATION": "Bearer paste_your_token_here"
}
}
}
}Where to put it:
Claude Code:
.mcp.jsonat your project root. This file is usually committed, so keep tokens out of it: useclaude mcp add -e,login, or.gitignoreit.Claude Desktop:
claude_desktop_config.json, at~/Library/Application Support/Claude/on macOS or%APPDATA%\Claude\on Windows. Restart the app afterwards.Cursor:
~/.cursor/mcp.jsonfor every project, or.cursor/mcp.jsonfor one.
Leave out the env block if you only want search and browsing, or if you signed in with login.
From a local clone
Requires Bun:
git clone https://github.com/mrmos/cosmos-mcp.git
cd cosmos-mcp
bun install
claude mcp add cosmos -- bun run /absolute/path/to/cosmos-mcp/index.tsUse absolute paths: MCP clients do not reliably resolve relative ones. A local clone reads .env, so you can leave env out of the client config.
Authentication
Skip this until you want to save something. Every tool without an A in the Tools tables works right now.
Cosmos has no API keys and no OAuth. The web app authenticates with a bearer token in the Authorization header, so this server reuses yours.
Sign in
npx cosmos-mcp loginIt walks you through copying the token, hides your input, verifies it against cosmos.so, and saves it only if it works. The credential goes in ~/.config/cosmos-mcp/config.json, written owner-only, and is never printed back. You can also pipe it in from a password manager: pbpaste | npx cosmos-mcp login.
npx cosmos-mcp status # which credential is in use, and whether it still works
npx cosmos-mcp logout # remove itTo copy the token (login prints these steps too):
Sign in at cosmos.so, then open DevTools (
Cmd+Option+Ion macOS,F12elsewhere).In the Network tab, reload the page and click any request to
api.cosmos.so.Under Request Headers, copy the whole
Authorizationvalue. It begins withBearer.
Do not copy the Cookie header: its AWSALB values are load-balancer routing and will not sign you in.
The server reads a credential from three places; the first one wins:
The
COSMOS_AUTHORIZATIONenvironment variable, set by an MCP client'senvblock.A
.envfile next to the package, for local clones.~/.config/cosmos-mcp/config.json, written bylogin.
Handling the token
Treat it like a password: anyone holding it can act as you on Cosmos.
Never commit it, not to
.mcp.json, a dotfile repo, or a screenshot.Don't paste it into a chat message. That writes it into transcripts and sends it to a model provider. Use the
envblock,.env, orlogininstead.It expires. When write tools report "not signed in", copy a fresh one.
Revoke it by signing out of that browser session on cosmos.so.
The token is sent to api.cosmos.so and nowhere else. This server has no telemetry and writes nothing to disk beyond the credential file login saves.
Why no password login? Cosmos has a login mutation, but using it would put your password through a third-party tool, and Cosmos rate-limits login attempts: scripted logins are exactly what its defences catch. A session token is narrower and revocable.
Environment variables
Copy .env.example to .env for a documented starting point. Nothing is required.
Variable | Default | What it does |
| unset | The whole |
| unset | A full session-bearing |
| unset | Your numeric Cosmos user id. Optional; skips the |
|
| GraphQL endpoint. Override only for a mock or proxy. |
|
| Per-request timeout in milliseconds. |
|
| Sent as |
| a desktop Chrome string | Sent as |
Tools
A means the tool needs a credential (COSMOS_AUTHORIZATION). Everything else works signed out. Without a credential, an A tool returns an error that explains the fix.
Find things
Tool | What it does | |
| Search every public element by keyword. Filter by content type and colour. | |
| Search public collections. Someone has often already built the board you want. | |
| Find people by name or handle. | |
| Search collections, people and elements at once. | |
| Give it one image you like; it returns images that look like it. | |
| Which public collections hold an image, and who saved it. Finds people with the taste you want. | |
| Browse 800+ curated collections, by category if you pass one. | |
| Describe a brief in a sentence; get images grouped into named directions. Experimental. | A |
| The featured feed. Pass a category to narrow it. | |
| Editorial collections, such as "Rooms Lit Only by Lamps". | |
| The 17 subject areas, such as Fashion and Interiors. | |
| Search phrases Cosmos promotes. Thin signed out. | |
| What Cosmos thinks belongs in a collection you already started. | A |
Read things
Tool | What it does | |
| One element in full: media, caption, source URL and author. | |
| One collection: name, owner, size, cover and subcollections. | |
| Page through the elements in a collection. | |
| A public profile: bio, links and top collections. | |
| The collections on a profile. Partial list when signed out. | |
| Return elements as real images so the model can look at them. Costs tokens; pass few ids. |
Build collections
Tool | What it does | |
| Create an empty collection. Private by default. | A |
| Add elements to one collection. | A |
| Save an image or page from anywhere on the web. Returns the new element id. | A |
| Add and remove elements across collections in one call. | A |
| Rename a collection, or change its description, privacy or cover. | A |
| Put a collection inside another, or pull it back out. | A |
| Delete a collection. Permanent. Needs | A |
| Which of your collections an element can go in, and which already hold it. | A |
| Ask Cosmos where an element belongs. | A |
Your account
Tool | What it does | |
| Report what the server can do now. Works signed out. Call it first. | |
| Everything you have saved. | A |
| Your collections, private ones included. | A |
| Recent saves by the people you follow. | A |
| Your notifications. | A |
| Follow or unfollow a person. | A |
| Follow or unfollow a collection. | A |
| Pin one of your collections to your profile, or unpin it. | A |
Tools return JSON and fill structuredContent for clients that read it. Paging works the same everywhere: pass the nextCursor from one call as the cursor of the next.
Example prompts
"Build me a moodboard about warm brutalist interiors and save it to a new private collection."
"Search Cosmos for 90s Japanese book covers, show me the twelve best as images, and save the ones I pick to a collection called Type Refs."
"Find this element on Cosmos, then pull twenty visually similar ones and tell me the common thread."
"What's in my Colour Studies collection? Group it by dominant colour."
"Look at this user's public collections and summarise their taste in three sentences."
"Take everything I saved this week and file it into the right existing collection."
Development
Requires Bun.
bun install # install dependencies
bun run dev # run the server from source, restarting on change
bun test # run tests
bun run typecheck # tsc --noEmit
bun run build # bundle to dist/index.js for NodeThe server speaks MCP over stdio. Anything on stdout that is not a JSON-RPC frame corrupts the protocol, so log to stderr.
To smoke-test the built artifact:
bun run build
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}\n' \
| node dist/index.jsYou should see cosmos-mcp ready on stdio on stderr and a JSON-RPC result containing serverInfo on stdout.
Project layout
index.ts entrypoint: stdio transport
src/
config.ts environment variables to CosmosConfig
errors.ts CosmosError, and the mapping from GraphQL codes to kinds
normalize.ts API shapes to the flatter shapes tools return
server.ts McpServer construction and tool registration
graphql/
client.ts HTTP client, auth headers, viewer resolution
fragments.ts shared GraphQL fragments
tools/
kit.ts shared helpers: ok/fail/guard, common arguments
account.ts whoami, library, feed, activity
browse.ts search, explore, elements, users, clusters
curate.ts create, save, organise
scripts/
probe-schema.ts schema discovery against the live API
docs/
har-ops/ reverse-engineered GraphQL operation reference
test/See docs/README.md for where the operation reference came from.
Questions
Does cosmos.so have an API? No. Cosmos publishes no public API, issues no API keys, and turns off GraphQL introspection. This server calls the same private endpoint the website calls.
Do I need an API key? No, there are none to get. Search and browsing need nothing. To save, copy your own session token from the browser: see Authentication.
Does it work without signing in? Yes. 18 of the 36 tools work signed out: search, collections, public profiles, images.
Which MCP clients does it support? Any client that speaks MCP over stdio.
Can this get my account banned? There is some risk; Cosmos promises this endpoint to no one. Use your own account at a normal pace, and read the disclaimer.
Will it break? Probably, one day, when Cosmos changes the endpoint. CONTRIBUTING.md explains how to check an operation against the live API and send a fix.
Contributing
Bug reports and pull requests are welcome. See CONTRIBUTING.md, especially the part about verifying a GraphQL operation against the live API before adding one.
License
MIT. See LICENSE.
Not affiliated with or endorsed by Cosmos.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceThis MCP server enables AI assistants to search for images on Wikimedia Commons, providing detailed metadata and optional thumbnail combinations to assist AI models in visual comparisons.Last updated12Apache 2.0
- FlicenseAqualityCmaintenanceMCP server that gives AI agents visual intelligence — search Pinterest, analyze images with LLM vision, build a semantic reference library, and retrieve by style or mood.Last updated61
- AlicenseAqualityCmaintenanceMCP server that analyzes images with Google's Gemini vision models, allowing agents to describe or ask questions about images without bloating context.Last updated1MIT
- Flicense-qualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.Last updated
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
MCP server for Flux AI image generation
MCP server for Midjourney AI image generation and editing
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrmos/cosmos-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server