custom-mcp-server

abhisvakil/custom-mcp-server

3.2

If you are the rightful owner of custom-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Content Quality MCP Server is a custom server designed to provide content quality validation agents for Contentstack, ensuring content meets various quality standards.

Content Quality MCP Server

A custom MCP (Modular Content Platform) server that provides content quality validation agents for Contentstack.

Features

  • ๐Ÿง  Content Quality Agent: Validates content for SEO, readability, grammar, compliance, and accessibility
  • ๐Ÿ“‹ MCP Manifest: Fully compatible with @contentstack/mcp client
  • ๐Ÿš€ Express Server: Lightweight and fast API server
  • ๐Ÿงช Testing Suite: Comprehensive test coverage

Quick Start

1. Installation

# Clone or create the project
mkdir content-quality-mcp-server
cd content-quality-mcp-server

# Install dependencies
npm install

2. Start the Server

# Development mode
npm run dev

# Production mode
npm start

3. Test the Server

# Run tests
npm test

# Manual testing
curl http://localhost:3000/manifest

API Endpoints

  • GET /manifest - MCP manifest for agent registration
  • GET /agents - List all available agents
  • POST /agents/content-quality-agent - Execute content quality validation
  • GET /agents/content-quality-agent/schema - Get agent input/output schema
  • GET /health - Health check endpoint

Usage with Contentstack

Register the MCP Server

npx @contentstack/mcp init --url http://your-server.com/manifest

Using the Agent

The content quality agent accepts:

{
  "content": "Your content here...",
  "contentType": "article",
  "validationRules": ["seo", "readability", "grammar", "compliance", "accessibility"]
}

Returns:

{
  "score": 85,
  "issues": [
    {
      "type": "warning",
      "category": "seo",
      "message": "Content could benefit from more subheadings",
      "suggestion": "Add H2-H6 tags to improve structure"
    }
  ],
  "suggestions": ["Add more descriptive headings", "Include relevant keywords"],
  "metadata": {
    "contentLength": 1250,
    "wordCount": 200,
    "contentType": "article",
    "validationRules": ["seo", "readability"],
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Deployment

Local Development

npm run dev

Production Deployment

Railway/Heroku:
# Set environment variables
PORT=3000
NODE_ENV=production
Docker:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]
Vercel/Netlify:

Configure as Node.js application

Environment Variables

  • PORT: Server port (default: 3000)
  • NODE_ENV: Environment (development/production)
  • MCP_VERSION: MCP protocol version

Testing

# Run all tests
npm test

# Test individual endpoints
curl -X GET http://localhost:3000/manifest
curl -X POST http://localhost:3000/agents/content-quality-agent \
  -H "Content-Type: application/json" \
  -d '{"content": "Test content", "contentType": "article"}'

Extending the Server

Adding New Agents

  • Create agent directory: agents/your-agent-name/
  • Add agent logic: agents/your-agent-name/index.js
  • Define schema: agents/your-agent-name/schema.json
  • Update manifest.json
  • Add route in server.js

Agent Structure

class YourAgent {
  async execute(input) {
    // Your agent logic here
    return {
      // Your response structure
    };
  }
}

module.exports = new YourAgent();

License

MIT License - see LICENSE file for details