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

content-mcp

v1.0.6

Published

Content Repurposer MCP Server - Transform content into viral multi-platform outputs

Readme

npm version License: MIT Node.js TypeScript


Table of Contents


Features

| Feature | Description | |---------|-------------| | 🚀 4 Powerful Tools | Repurpose content, generate hooks, extract scripts, multi-platform packs | | 📱 Multi-Platform | Instagram, LinkedIn, Twitter, YouTube support | | ⚡ High Performance | In-memory caching with 5-minute TTL | | 🔄 Retry Logic | Built-in retry mechanism for LLM API calls | | 📝 Type-Safe | Zod validation for all inputs | | 🏗️ ES Modules | Modern Node.js module system | | 📦 Zero Dependencies | Lightweight - only uses proven libraries | | 🎯 MCP Compliant | Full Model Context Protocol support |


Installation

Prerequisites

  • Node.js 18 or higher
  • npm or yarn

Install from npm

# Global installation
npm install -g content-mcp

# Or use npx without installing
npx content-mcp

Install from source

# Clone the repository
git clone https://github.com/RonakMunjapara/content-mcp.git
cd content-mcp

# Install dependencies
npm install

# Build the project
npm run build

Quick Start

CLI Usage

# Run in stdio mode (for Claude Desktop)
npm start

# Run in HTTP mode
npm run start:http

# Development mode with hot reload
npm run dev

HTTP Mode

# Start HTTP server on default port 8080
node dist/server.js --http

# Custom port
PORT=3000 node dist/server.js --http

# Test the server
curl http://localhost:8080/health

Tools

1. repurpose_content

Transforms content into platform-specific viral posts with optimized hooks, captions, and hashtags.

Input:

{
  "content": "Your original content here...",
  "platform": "instagram" | "linkedin" | "twitter" | "youtube"
}

Output:

{
  "caption": "Optimized caption for the platform",
  "hashtags": ["#relevant", "#hashtags"],
  "hook": "Engaging hook to grab attention"
}

Platform-Specific Formatting:

| Platform | Max Length | Tone | CTA Style | |----------|------------|------|-----------| | Instagram | 2,200 | Conversational, emoji-friendly | Comment prompt | | LinkedIn | 3,000 | Professional, thought-leadership | Discussion prompt | | Twitter | 280 | Concise, punchy | RT request | | YouTube | 5,000 | Exciting, curiosity-driven | Subscribe prompt |


2. generate_hooks

Generates 10 viral hooks using proven psychological patterns.

Input:

{
  "content": "Your content to generate hooks for..."
}

Output:

{
  "hooks": [
    "What nobody tells you about [topic]...",
    "The secret to [topic] nobody talks about...",
    "Stop struggling with [topic]. Here's the fix...",
    "This [topic] mistake costs you years...",
    "I spent years learning this about [topic]...",
    "What if [topic] is actually simpler?",
    "You're doing [topic] wrong. Here's why...",
    "The hidden truth about [topic]...",
    "Why most people fail at [topic]...",
    "Ready to transform your [topic] game?"
  ]
}

Hook Styles:

  • 🔥 Curiosity - Pique interest with the unknown
  • Urgency - Create FOMO with time-sensitive language
  • 😱 Shock - Use surprising statistics or revelations
  • 😤 Pain - Address common frustrations
  • 🎯 Result - Show measurable outcomes
  • Question - Engage with direct questions

3. extract_script

Converts content into a 20-30 second reel/short script optimized for maximum engagement.

Input:

{
  "content": "Your long-form content..."
}

Output:

{
  "script": "[HOOK - 3 seconds]\nAttention-grabbing opening\n\n[BODY - 20 seconds]\nCore content with key points\n\n[CTA - 4 seconds]\nEngagement call-to-action"
}

Script Structure:

| Segment | Duration | Purpose | |---------|----------|---------| | Hook | 3 seconds | Grab attention immediately | | Body | 20 seconds | Deliver core value | | CTA | 4 seconds | Drive engagement |


4. multi_platform_pack

Generates optimized content for all platforms simultaneously.

Input:

{
  "content": "Your content to repurpose..."
}

Output:

{
  "instagram": {
    "caption": "...",
    "hashtags": ["..."]
  },
  "linkedin": {
    "post": "..."
  },
  "twitter": {
    "thread": ["tweet1", "tweet2", "..."]
  },
  "youtube": {
    "title": "...",
    "description": "..."
  }
}

Configuration

Claude Desktop

Method 1: Using npm start (Recommended)

{
  "mcpServers": {
    "content-repurposer": {
      "command": "npm",
      "args": ["start", "--prefix", "/path/to/content-mcp"],
      "env": {}
    }
  }
}

Method 2: Using node directly

{
  "mcpServers": {
    "content-repurposer": {
      "command": "node",
      "args": ["/path/to/content-mcp/dist/server.js"],
      "env": {}
    }
  }
}

Method 3: Using npx (After publishing)

{
  "mcpServers": {
    "content-repurposer": {
      "command": "npx",
      "args": ["content-mcp"],
      "env": {}
    }
  }
}

Config File Locations:

| OS | Path | |----|------| | macOS | ~/Library/Application Support/Claude/settings.json | | Windows | %APPDATA%\Claude\settings.json | | Linux | ~/.config/Claude/settings.json |


Cursor

{
  "mcpServers": {
    "content-repurposer": {
      "command": "npm",
      "args": ["start", "--prefix", "/path/to/content-mcp"],
      "env": {}
    }
  }
}

Other MCP Clients

Via HTTP

# Start the server in HTTP mode
node dist/server.js --http

# The server will be available at
http://localhost:8080

Via Stdio

# Pipe JSON-RPC commands to stdin
echo '{"jsonrpc":"2.0","method":"initialize","params":{...}}' | node dist/server.js

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | PORT | 8080 | HTTP server port | | NODE_ENV | development | Environment (development/production) |


API Reference

MCP Protocol

The server implements the full MCP protocol with these methods:

initialize

Initialize the server and get capabilities.

{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {},
    "clientInfo": {
      "name": "claude-desktop",
      "version": "1.0.0"
    }
  }
}

tools/list

List available tools.

{
  "jsonrpc": "2.0",
  "id": "2",
  "method": "tools/list",
  "params": {}
}

tools/call

Call a specific tool.

{
  "jsonrpc": "2.0",
  "id": "3",
  "method": "tools/call",
  "params": {
    "name": "repurpose_content",
    "arguments": {
      "content": "Your content...",
      "platform": "instagram"
    }
  }
}

Development

Project Structure

content-mcp/
├── src/
│   ├── server.ts          # Main MCP server
│   ├── utils/
│   │   ├── logger.ts       # Logging utility
│   │   ├── cache.ts        # In-memory cache
│   │   └── retry.ts       # Retry logic
│   └── tools/
│       ├── repurposeContent.ts
│       ├── generateHooks.ts
│       ├── extractScript.ts
│       └── multiPlatformPack.ts
├── package.json
├── tsconfig.json
├── README.md
└── RUN.md

Available Scripts

# Build TypeScript
npm run build

# Start server (stdio mode)
npm start

# Start server (HTTP mode)
npm run start:http

# Development with hot reload
npm run dev

# Type checking
npm run typecheck

Adding LLM Support

The retry utility is ready for LLM integration. To add OpenAI or Anthropic:

import { retry } from './utils/retry.js';
import axios from 'axios';

async function callLLM(prompt: string) {
  return retry(async () => {
    const response = await axios.post('https://api.openai.com/v1/chat/completions', {
      model: 'gpt-4',
      messages: [{ role: 'user', content: prompt }]
    }, {
      headers: { Authorization: `Bearer ${process.env.OPENAI_API_KEY}` }
    });
    return response.data;
  }, { maxAttempts: 3, delayMs: 1000 });
}

Contributing

Contributions are welcome! Please read our contributing guidelines first.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.


Related