npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cosmic-mcp

v1.0.0

Published

A Model Context Protocol (MCP) server for the Cosmic headless CMS.

Readme

Cosmic MCP Server

License: MIT Cosmic Build Status Tests Coverage

A robust, production-ready Model Context Protocol (MCP) server for interacting with the Cosmic headless CMS. This server provides a comprehensive set of tools for creating, reading, updating, and deleting objects, types, and media in your Cosmic bucket.

✨ Features

  • Comprehensive Toolset: Full CRUD operations for Cosmic objects, object types, and media.
  • Robust Architecture: Built with a clean, three-layer architecture (Server, Services, Repositories).
  • Strongly Typed: Written in TypeScript with strict validation using Zod for all inputs.
  • Production-Ready: Includes centralized logging, rate-limiting, and graceful error handling.
  • Easy to Configure: Simple setup using a .env file for your Cosmic credentials.
  • Extensible: Designed to be easily extended with new tools and services.

🚀 Getting Started

Prerequisites

  • Bun (v1.0 or higher)
  • A Cosmic account and bucket.

1. Installation

Clone the repository and install the dependencies:

git clone https://github.com/your-username/your-repo.git
cd your-repo
bun install

2. Configuration

Copy the example environment file and fill in your Cosmic bucket credentials. You can find these in your Cosmic dashboard under Bucket > Settings > API Keys.

cp .env.example .env

Your .env file should look like this:

# .env
COSMIC_BUCKET_SLUG="your-bucket-slug"
COSMIC_READ_KEY="your-read-key"
COSMIC_WRITE_KEY="your-write-key"
DEBUG="false" # Set to "true" for verbose logging

3. Running the Server

Start the MCP server using the following command:

bun start

The server will connect and be ready to receive requests from any MCP-compatible client.


🛠️ Available Tools

This MCP server exposes the following tools. All tools are designed to be called by an AI agent or other MCP client.

| Tool Name | Description | | ------------------- | ---------------------------------------------------------------------- | | list_objects | List objects, with optional filtering by type, status, and pagination. | | get_object | Get a specific object by its ID or by its slug and type. | | create_object | Create a new object. | | update_object | Update an existing object. | | delete_object | Delete an object. | | list_object_types | List all available object types in the bucket. | | search_objects | Perform a text-based search across objects. | | upload_media | Upload a media file. | | list_media | List all media files, with pagination. | | delete_media | Delete a media file by its ID. |

For detailed input schemas for each tool, please refer to the src/manifest.ts file or the VitePress documentation.


🧪 Running Tests

This project is set up with tests to ensure reliability.

# Run all tests
bun test

🤝 Contributing

Contributions are welcome! If you have a suggestion or find a bug, please open an issue to discuss it.

  1. Fork the repository.
  2. Create your feature branch: git checkout -b feat/new-amazing-feature
  3. Commit your changes: git commit -m 'feat: Add some amazing feature'
  4. Push to the branch: git push origin feat/new-amazing-feature
  5. Open a pull request.

Please make sure to update tests as appropriate.

📄 License

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