๐ MCP ContentEngineering - Simplified
A simplified Model Context Protocol (MCP) server that enables access to raw Markdown content. This server offers a powerful tool for accessing individual Markdown files or combining multiple files from directories, all without any processing or parsing.
๐ Quick Start
Prerequisites
- Node.js 18+ and npm
- Markdown files or directories containing
.md files
- An MCP-compatible client (such as Claude Desktop, Cursor IDE, or any other MCP client)
Installation & Configuration
Option 1: Using npx from GitHub (Recommended)
No installation is required! Simply configure your MCP client:
For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mcp-content-engineering": {
"command": "npx",
"args": ["-y", "hendrickcastro/MCPContentEngineering"],
"env": {
"CONTENT_SOURCE_TYPE": "file",
"CONTENT_SOURCE_PATH": "/path/to/your/business-rules.md"
}
}
}
}
For Cursor IDE:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "npx",
"args": ["-y", "hendrickcastro/MCPContentEngineering"],
"env": {
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "/path/to/your/docs/"
}
}
}
}
Option 2: Local Development Installation
- Clone and setup:
git clone https://github.com/hendrickcastro/MCPContentEngineering.git
cd MCPContentEngineering
npm install
npm run build
- Configure content source:
Create a
.env file with your content configuration:
CONTENT_SOURCE_TYPE=file
CONTENT_SOURCE_PATH=/docs/architecture-guide.md
CONTENT_SOURCE_TYPE=directory
CONTENT_SOURCE_PATH=/docs/knowledge-base/
- Configure MCP client with local path:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "node",
"args": ["path/to/MCPContentEngineering/dist/server.js"]
}
}
}
โจ Features
MCPContentEngineering offers 1 specialized tool for accessing Markdown content:
๐ Raw Content Access - content_get_raw
Retrieve raw Markdown content without any processing, parsing, or indexing. Ideal for accessing business rules, documentation, or knowledge bases in their original form.
Features:
- โ
Single File Mode: Returns the exact content of a file
- โ
Directory Mode: Combines ALL
.md files with clear separators
- โ
Recursive Search: Finds
.md files in subdirectories
- โ
No Processing: Content is returned exactly as written
- โ
Metadata Included: Provides file size, modification date, and source information
๐ฆ Installation
MCPContentEngineering supports two content source types with straightforward configuration:
๐ Environment Variables
| Property |
Details |
Values |
Required |
CONTENT_SOURCE_TYPE |
Content source type |
file | directory |
Yes |
CONTENT_SOURCE_PATH |
Path to file or directory |
Absolute or relative path |
Yes |
๐ง Configuration Examples
1. ๐ Single Business Rules File
Suitable for accessing a specific rules or documentation file:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "npx",
"args": ["-y", "hendrickcastro/MCPContentEngineering"],
"env": {
"CONTENT_SOURCE_TYPE": "file",
"CONTENT_SOURCE_PATH": "/docs/business-rules.md"
}
}
}
}
2. ๐ Knowledge Base Directory
Combines all Markdown files from a documentation directory:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "npx",
"args": ["-y", "hendrickcastro/MCPContentEngineering"],
"env": {
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "/company/knowledge-base/"
}
}
}
}
3. ๐๏ธ Architecture Documentation
Access comprehensive architecture documentation:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "npx",
"args": ["-y", "hendrickcastro/MCPContentEngineering"],
"env": {
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "/docs/architecture/"
}
}
}
}
4. ๐ Project Standards & Patterns
Access coding standards and design patterns:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "npx",
"args": ["-y", "hendrickcastro/MCPContentEngineering"],
"env": {
"CONTENT_SOURCE_TYPE": "file",
"CONTENT_SOURCE_PATH": "/standards/coding-patterns.md"
}
}
}
}
5. ๐ Local Development Configuration
For local development and testing:
{
"mcpServers": {
"mcp-content-engineering": {
"command": "node",
"args": ["./MCPContentEngineering/dist/server.js"],
"env": {
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "./docs"
}
}
}
}
๐ป Usage Examples
Single File Access
const result = await content_get_raw({});
console.log(result.data.content);
console.log(result.data.source_info);
console.log(result.data.total_files);
Directory Combination
const result = await content_get_raw({});
console.log(result.data.content);
console.log(result.data.source_info);
console.log(result.data.total_files);
Response Structure
interface ContentResponse {
content: string;
source_info: string;
total_files: number;
size_bytes: number;
last_modified: string;
}
๐ Documentation
1. ๐ Enterprise Knowledge Base
Access company documentation, policies, and procedures:
{
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "/company/knowledge-base/"
}
2. ๐๏ธ Architecture Documentation
Provide AI models with architectural guidelines and patterns:
{
"CONTENT_SOURCE_TYPE": "file",
"CONTENT_SOURCE_PATH": "/docs/architecture-layers-summary.md"
}
3. ๐ Coding Standards
Access development standards and best practices:
{
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "/standards/"
}
4. ๐ Business Rules Engine
Provide specific business rules for decision-making:
{
"CONTENT_SOURCE_TYPE": "file",
"CONTENT_SOURCE_PATH": "/rules/validation-rules.md"
}
5. ๐ Project Documentation
Combine all project documentation for comprehensive context:
{
"CONTENT_SOURCE_TYPE": "directory",
"CONTENT_SOURCE_PATH": "/project/docs/"
}
๐จ Troubleshooting Common Issues
File/Directory Not Found
- Issue:
File not found or Directory not found
- Solution: Verify that the path exists and is accessible
- Check: Use absolute paths for clarity
No .md Files Found
- Issue:
No .md files found in directory
- Solution: Ensure that the directory contains
.md files
- Note: Searches recursively in subdirectories
Permission Errors
- Issue: Permission denied when accessing files
- Solution: Ensure that you have read permissions on the files/directories
- Check: File ownership and access rights
Configuration Issues
- Issue:
CONTENT_SOURCE_PATH not configured
- Solution: Set both required environment variables
- Required:
CONTENT_SOURCE_TYPE and CONTENT_SOURCE_PATH
๐ง Technical Details
Project Structure
MCPContentEngineering/
โโโ src/
โ โโโ __tests__/ # Comprehensive test suite
โ โ โโโ unit.test.ts # Unit tests with temp files
โ โ โโโ real.test.ts # Real file testing
โ โโโ tools/ # Tool implementation
โ โ โโโ contentOperations.ts # Single tool: content_get_raw
โ โ โโโ types.ts # Type definitions
โ โ โโโ index.ts # Tool exports
โ โโโ server.ts # MCP server setup
โ โโโ tools.ts # Tool definitions and schemas
โ โโโ mcp-server.ts # Tool re-exports
โโโ dist/ # Compiled JavaScript output
โโโ package.json # Dependencies and scripts
Key Features
- โก Zero Processing: Content is returned exactly as written
- ๐ Recursive Search: Finds
.md files in all subdirectories
- ๐ File Combination: Intelligent merging with clear separators
- ๐ Rich Metadata: Comprehensive file and content information
- ๐ก๏ธ Error Handling: Robust error handling and validation
- ๐ง Simple Configuration: Just two environment variables
๐ Important Notes
โ ๏ธ Important Note
- File Types: Only processes
.md (Markdown) files
- Content Preservation: Returns content exactly as written - no processing
- Directory Mode: Recursively finds ALL
.md files in subdirectories
- File Separators: Clear HTML comment separators when combining files
- Encoding: Assumes UTF-8 encoding for all files
- Security: Read-only operations only - no file modifications
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Make your changes and add tests
- Ensure all tests pass (
npm test)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
๐ท๏ธ Tags & Keywords
Content Management: markdown documentation knowledge-base content-access raw-content file-processing text-processing document-management
MCP & AI: model-context-protocol mcp-server mcp-tools ai-tools claude-desktop cursor-ide anthropic llm-integration ai-content intelligent-content
Technology: typescript nodejs npm-package cli-tool file-system markdown-reader content-sdk text-api file-api content-connector
Use Cases: business-rules architecture-docs coding-standards project-docs knowledge-management content-retrieval documentation-access standards-access rule-engine content-automation
๐ฏ MCPContentEngineering provides simple, direct access to raw Markdown content through the Model Context Protocol. Perfect for AI models that need access to business rules, documentation, or knowledge bases without any processing overhead! ๐