Content Manager 标志

Content Manager

社区
Talljack

A TypeScript MCP Server for content management, including markdown processing, document generation, and note searching

发布者Talljack
代码仓库content-manager-mcp
语言TypeScript
复刻数
1
星标数
3
可用工具
0
传输类型stdio
分类
链接
  • 将工具接入 AI 工作流

    Content Manager 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 3 个 Star 和 1 个 Fork。

Content Manager MCP Server

A comprehensive TypeScript-based Model Context Protocol (MCP) server for content management, including Markdown processing, document generation, and intelligent note searching.

🚀 Features

📝 Markdown Processing

  • Render Markdown to HTML with table of contents generation
  • Extract headings and create structured navigation
  • Parse frontmatter from Markdown files
  • HTML sanitization for safe content processing

🔍 Intelligent Search

  • Fuzzy search through notes using Fuse.js
  • Exact text matching with context highlighting
  • Tag-based filtering using frontmatter metadata
  • Date range queries for time-based content discovery

📊 Content Analysis

  • Directory statistics showing file counts, sizes, and types
  • File discovery with customizable extension filtering
  • Content preview with metadata extraction

🛠 Tech Stack

  • TypeScript - Type-safe development with latest ES2023 features
  • Zod - Runtime schema validation and type inference
  • tsup - Fast TypeScript bundler with ESM support
  • pnpm - Efficient package management
  • Fuse.js - Fuzzy search functionality
  • marked - Markdown parsing and rendering

📦 Installation

Option 1: NPM Package (Recommended)

bash
# Install globally
npm install -g content-manager-mcp

# Or use directly with npx
npx -y content-manager-mcp

Option 2: From Source

Prerequisites

  • Node.js >= 20.0.0
  • pnpm >= 9.0.0

Setup

bash
# Clone and install dependencies
git clone <repository-url>
cd content-manager-mcp
pnpm install

# Build the project
pnpm build

# Run in development mode
pnpm dev

🔧 Usage

As MCP Server

The server runs via stdio and implements the MCP protocol:

Using NPM Package

bash
# If installed globally
content-manager-mcp

# Using npx (no installation required)
npx -y content-manager-mcp

Using Source Build

bash
node dist/index.js

MCP Client Configuration

Claude Desktop

Add to your Claude Desktop configuration:

json
{
  "mcpServers": {
    "content-manager": {
      "command": "npx",
      "args": ["-y", "content-manager-mcp"]
    }
  }
}

Cherry Studio

Configure MCP server:

  • Command: npx
  • Arguments: ["-y", "content-manager-mcp"]

Codex

Add to your Codex MCP servers configuration:

json
{
  "mcpServers": {
    "content-manager": {
      "command": "npx",
      "args": ["-y", "content-manager-mcp"]
    }
  }
}

Claude Code

Add MCP server using Claude Code CLI:

bash
# Add content-manager-mcp server to Claude Code
claude mcp add content-manager -- npx -y content-manager-mcp

# Or if you prefer to install globally first
npm install -g content-manager-mcp
claude mcp add content-manager -- content-manager-mcp

VS Code

Install the MCP extension and configure:

  1. Install the MCP extension from VS Code marketplace
  2. Add to your VS Code settings (settings.json):
json
{
  "mcp.servers": {
    "content-manager": {
      "command": "npx",
      "args": ["-y", "content-manager-mcp"]
    }
  }
}

Cursor

Configure MCP server in Cursor settings:

  1. Open Cursor settings
  2. Navigate to MCP configuration
  3. Add new server:
    • Name: content-manager
    • Command: npx
    • Arguments: ["-y", "content-manager-mcp"]

Or add to Cursor's settings.json:

json
{
  "mcp.servers": {
    "content-manager": {
      "command": "npx",
      "args": ["-y", "content-manager-mcp"]
    }
  }
}

Available Tools

render_markdown

Converts Markdown content to HTML with optional features:

typescript
{
  content: string,           // Markdown content to render
  generateToc?: boolean,     // Generate table of contents (default: true)
  sanitizeHtml?: boolean,    // Sanitize output HTML (default: true)
  enableCodeHighlight?: boolean // Enable syntax highlighting (default: true)
}

search_notes

Intelligent search through content files:

typescript
{
  query: string,             // Search query
  directory?: string,        // Directory to search (default: cwd)
  includeContent?: boolean,  // Include file content in results (default: true)
  maxResults?: number,       // Maximum results to return (default: 10)
  fuzzy?: boolean           // Use fuzzy search (default: true)
}

search_by_tags

Find files by frontmatter tags:

typescript
{
  tags: string[],           // Array of tags to search for
  directory?: string        // Directory to search (default: cwd)
}

search_by_date_range

Find files by modification date:

typescript
{
  startDate: string,        // ISO date string (YYYY-MM-DD)
  endDate: string,          // ISO date string (YYYY-MM-DD)
  directory?: string        // Directory to search (default: cwd)
}

generate_table_of_contents

Extract and format headings as a table of contents:

typescript
{
  content: string           // Markdown content to analyze
}

extract_headings

Get structured heading information:

typescript
{
  content: string           // Markdown content to analyze
}

extract_frontmatter

Parse YAML frontmatter from Markdown:

typescript
{
  content: string           // Markdown content with frontmatter
}

get_directory_stats

Analyze directory content statistics:

typescript
{
  directory?: string        // Directory to analyze (default: cwd)
}

find_content_files

Discover files with specific extensions:

typescript
{
  directory?: string,           // Directory to search (default: cwd)
  extensions?: string[]         // File extensions (default: ['.md', '.markdown', '.txt', '.mdx'])
}

read_content_file

Read and parse a single content file:

typescript
{
  filePath: string             // Path to file to read
}

🧪 Development

Scripts

  • pnpm dev - Development mode with watch
  • pnpm build - Build for production
  • pnpm start - Run built server
  • pnpm lint - Check code style
  • pnpm lint:fix - Fix code style issues
  • pnpm type-check - TypeScript type checking
  • pnpm clean - Clean build artifacts

Type Safety

This project leverages Zod for runtime validation combined with TypeScript for compile-time safety. All tool arguments are validated at runtime, ensuring robust error handling and type safety.

Error Handling

  • Comprehensive error catching and reporting
  • Zod validation errors with descriptive messages
  • File system error handling
  • Graceful degradation for malformed content

📝 Example Usage

Frontmatter Format

The server recognizes YAML frontmatter in Markdown files:

markdown
---
title: My Document
tags: [typescript, mcp, documentation]
author: Your Name
date: 2024-01-15
---

# Document Content

Your markdown content here...

Search Examples

  • Fuzzy search: query: "typescript mcp" (finds related content)
  • Exact search: query: "exact phrase", fuzzy: false
  • Tag search: tags: ["typescript", "documentation"]
  • Date search: startDate: "2024-01-01", endDate: "2024-12-31"

📤 Publishing

This package is published to NPM as @yugangcao/content-manager-mcp. To publish a new version:

bash
# Build the project
pnpm build

# Update version (patch/minor/major)
npm version patch

# Publish to NPM
npm publish

For detailed publishing instructions, see PUBLISH_TO_NPM.md.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make changes and add tests
  4. Ensure types are correct: pnpm type-check
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.


Built with ❤️ using TypeScript, Zod, and the latest modern tooling for robust content management.

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "content-manager": {
      "command": "npx",
      "args": [
        "-y",
        "content-manager-mcp"
      ]
    }
  }
}

将 Content Manager MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Content Manager 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Content Manager 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Content Manager MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "content-manager": {
      "command": "npx",
      "args": [
        "-y",
        "content-manager-mcp"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Content Manager MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Content Manager MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Content Manager 帮我完成这项任务吗?
Content Manager
当然。我已阅读。
以下是我使用 Content Manager 得到的结果。

常见问题

Content Manager MCP 服务器有什么用途?

Content Manager 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Content Manager MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Content Manager,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Content Manager MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Content Manager 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Content Manager MCP 连接到 TypingMind?

Content Manager 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Content Manager MCP 在 TypingMind 中提供哪些工具?

Content Manager 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Content Manager MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Content Manager 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇