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

@coldfox-pb/cinephage-mcp

v1.0.1

Published

An MCP server for the Cinephage Media Server

Downloads

332

Readme

Cinephage MCP Server

This repository contains the Model Context Protocol (MCP) server for Cinephage. It acts as a bridge between AI agents (like Claude or opencode) and your local Cinephage instance.

💡 Explanation: How It Works

This server operates by dynamically parsing the cinephage.openapi.yaml specification file. Instead of hardcoding individual tools, it iterates through all 350+ API endpoints defined in the spec and registers each one as an independent MCP tool. It automatically maps OpenAPI parameters (path, query, and JSON bodies) into strict Zod schemas, ensuring the AI agent receives perfect type validation before executing a request.

The Concept of Roles

Exposing 350+ tools simultaneously can overwhelm an AI agent's context window. To solve this, the server utilizes Roles. By passing a --role flag upon startup, you can filter which tools the server exposes based on OpenAPI tags:

  • Core Role (--role=core): Exposes ~140 tools related to daily media operations (Library, Search, Queue, Subtitles, Activity). This is recommended for daily use.
  • Admin Role (--role=admin): Exposes ~210 tools related to infrastructure and configuration (Indexers, Download Clients, Settings, System Health). This should only be enabled when explicitly performing system maintenance.

📚 Tutorials

Development Setup

This section is only needed if you want to run the server from source (e.g. for contributing). If you just want to use the server, skip to How to Configure in opencode or Claude Desktop, which uses npx and requires no local setup.

To run the MCP server from source, you must first build the TypeScript project and provide your Cinephage credentials.

  1. Install Dependencies

    npm install
  2. Build the Project The server is written in TypeScript and must be compiled to standard JavaScript before execution.

    npm run build
  3. Configure Environment Variables The server expects a .env file two directories above the src folder (at the workspace root). Ensure your .env contains:

    CINEPHAGE_URL=http://your-cinephage-ip:3030
    CINEPHAGE_API_KEY=your_api_key_here

🎯 How-To Guides

How to Configure in opencode or Claude Desktop

The easiest way to use the server is via npx, which pulls the latest version straight from the public npm registry — no GitHub token or custom registry configuration required. We highly recommend splitting the configuration into two separate servers so you can keep the admin tools disabled by default.

Add the following to your opencode.json (or claude_desktop_config.json):

{
  "mcp": {
    "cinephage-core": {
      "type": "local",
      "command": ["npx", "-y", "@coldfox-pb/cinephage-mcp", "--role=core"],
      "enabled": true,
      "env": {
        "CINEPHAGE_URL": "http://your-cinephage-ip:3030",
        "CINEPHAGE_API_KEY": "your_api_key_here"
      }
    },
    "cinephage-admin": {
      "type": "local",
      "command": ["npx", "-y", "@coldfox-pb/cinephage-mcp", "--role=admin"],
      "enabled": false,
      "env": {
        "CINEPHAGE_URL": "http://your-cinephage-ip:3030",
        "CINEPHAGE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Note: Change enabled: false to true for the admin server when you need the AI to debug or reconfigure your Cinephage settings.


📖 Reference

CLI Arguments

The compiled server (dist/index.js) accepts the following arguments:

| Argument | Description | | :--- | :--- | | --role=core | Loads only media-focused endpoints (e.g., tags: Library, Movies, Search). | | --role=admin | Loads only configuration/system endpoints (e.g., tags: Settings, Indexers). | | --role=all | (Default if omitted). Loads all 350+ endpoints simultaneously. |

Environment Variables

The server requires configuration to communicate with your Cinephage instance. It attempts to load these from a .env file.

| Variable | Required | Default | Description | | :--- | :--- | :--- | :--- | | CINEPHAGE_URL | No | http://your-cinephage-ip:3030 | The base URL of your Cinephage instance. | | CINEPHAGE_API_KEY | Yes | "" | The API key used to authenticate requests. |