cosmos-mcp
by vihaanshahh
README.md
# cosmos-mcp
MCP server for searching [cosmos.so](https://www.cosmos.so). Returns direct CDN image URLs — no page scraping.
Used by [TVLR](https://github.com/vihaanshahh/tvlr) to find destination photos for `places.json`.
## Install
```bash
git clone https://github.com/vihaanshahh/cosmos-mcp.git
cd cosmos-mcp
npm install
```
## Cursor / Claude Code
```json
{
"mcpServers": {
"cosmos": {
"type": "stdio",
"command": "node",
"args": ["/path/to/cosmos-mcp/dist/index.js"]
}
}
}
```
## Tools
| Tool | What it does |
|------|--------------|
| `search_images` | Search by keyword. Filter by color, content type, sort order. |
| `search_collections` | Search curated boards. |
| `get_element` | Look up one element by ID or `cosmos.so/e/...` URL. |
### search_images
```json
{
"query": "Tokyo skyline dusk",
"limit": 10,
"exclude_ai": true,
"order": "RELEVANT",
"color": "FF5500"
}
```
Returns `results[].media_id`, `thumbnail_url`, `image_url`, `caption`.
### get_element
```json
{ "element_id": 1169598936 }
```
Or pass a full share URL.
## TVLR workflow
1. `search_images({ query: "Porto azulejos tiles", exclude_ai: true })`
2. Pick a result → copy UUID from CDN URL → set as `cosmosId` in `places.json`
3. URL pattern: `https://cdn.cosmos.so/<cosmosId>?format=webp&w=800`
## Dev
```bash
npm run build
npm run dev
```
## Notes
- No API key. Uses Cosmos's public GraphQL endpoint.
- Not an official Cosmos API — same backend the website uses.
- Typical search: ~300ms.
## License
MIT
TDQS
A3.9/5.0
Scored across 3 tools
Disambiguation5/5
Each tool has a clearly distinct purpose: retrieving a specific element by ID/URL, searching collections, and searching images. There is no overlap in functionality.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern with snake_case: get_element, search_collections, search_images. No naming style variations.
Tool Count4/5
With 3 tools, the set is slightly minimal but covers core retrieval and search operations for the cosmos.so domain. It feels appropriately scoped for a read-only search API.
Completeness3/5
The tools are read-only (get and search), lacking create, update, or delete operations for elements or collections. This is a notable gap if full lifecycle management is expected, but it may be sufficient for a search-focused tool.
Maintenance
ActivityStale
ResponsivenessNo issues