blast-cms-mcp

説明なし

GitHubスター

0

ユーザー評価

未評価

フォーク

0

イシュー

0

閲覧数

2

お気に入り

0

README
BlastCMS MCP

This repository contains MCP (Model Context Protocol) server for BlastCMS, providing seamless integration between AI assistants and BlastCMS content management system.

Features
  • Retrieve blog articles, feed articles, and landing pages from BlastCMS
  • Generate Blazor components for displaying content
  • Access image files and podcast content
  • Template-based component generation using Scriban
Configuration

The MCP server requires a BlastCMS Content Key for authentication. This can be configured through:

  1. Environment Variables: BlastCMSConfig__BlastCMSContentKey
  2. User Secrets (development): BlastCMSConfig:BlastCMSContentKey
  3. appsettings.json:
    {
      "BlastCMSConfig": {
        "BlastCMSContentKey": "your-content-key-here"
      }
    }
    
Running with Docker
Prerequisites
  • Docker Desktop installed and running
  • BlastCMS Content Key
Building the Docker Image
  1. Clone this repository:

    git clone https://github.com/bradjolicoeur/blast-cms-mcp.git
    cd blast-cms-mcp
    
  2. Build the Docker image:

    docker build -t blast-cms-mcp .
    
Running the Container
Option 1: Using Environment Variables
docker run -it --rm \
  -e BlastCMSConfig__BlastCMSContentKey="your-content-key-here" \
  blast-cms-mcp
Option 2: Using Docker Compose

Create a docker-compose.yml file:

version: '3.8'
services:
  blast-cms-mcp:
    build: .
    environment:
      - BlastCMSConfig__BlastCMSContentKey=your-content-key-here
    stdin_open: true
    tty: true

Run with:

docker-compose up
Option 3: Using Environment File

Create a .env file in the project root:

BlastCMSConfig__BlastCMSContentKey=your-content-key-here

Run with:

docker run -it --rm --env-file .env blast-cms-mcp
Docker Desktop Configuration
  1. Open Docker Desktop
  2. Navigate to Images and verify your blast-cms-mcp image is listed
  3. Run the container by clicking the "Run" button on your image
  4. Configure Environment Variables:
    • Click "Optional settings"
    • Under "Environment variables", add:
      • Name: BlastCMSConfig__BlastCMSContentKey
      • Value: your-content-key-here
  5. Enable Interactive Mode:
    • Check "Interactive" and "TTY" options for stdio communication
  6. Click "Run"
Integration with AI Assistants

When the container is running, it communicates via stdio using the Model Context Protocol. Configure your AI assistant to use this MCP server for BlastCMS content operations.

Claude Desktop Configuration

Add to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "blast-cms": {
      "command": "docker",
      "args": [
        "run", 
        "-i", 
        "--rm", 
        "-e", 
        "BlastCMSConfig__BlastCMSContentKey=your-content-key-here",
        "blast-cms-mcp"
      ]
    }
  }
}
GitHub Copilot Configuration

For GitHub Copilot in VS Code, create or update the MCP configuration file in your workspace:

  1. Create the VS Code configuration directory (if it doesn't exist):

    mkdir .vscode
    
  2. Create or update .vscode/mcp.json with the Docker configuration:

{
    "servers": {
        "blast-cms-mcp": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "BlastCMSConfig__BlastCMSContentKey=your-content-key-here",
                "blast-cms-mcp"
            ]
        }
    }
}
Alternative: Direct .NET Configuration

If you prefer to run the MCP server directly without Docker, use this configuration in .vscode/mcp.json:

{
    "servers": {
        "blast-cms-mcp": {
            "type": "stdio",
            "command": "dotnet",
            "args": [
                "run",
                "--project",
                "src/BlastCMS.MCP.Server/BlastCMS.MCP.Server.csproj"
            ],
            "cwd": ".",
            "env": {
                "BlastCMSConfig__BlastCMSContentKey": "your-content-key-here"
            }
        }
    }
}

Note: Replace your-content-key-here with your actual BlastCMS Content Key in both configurations.

Development
Local Development Setup
  1. Clone the repository
  2. Set up user secrets:
    cd src/BlastCMS.MCP.Server
    dotnet user-secrets set "BlastCMSConfig:BlastCMSContentKey" "your-content-key-here"
    
  3. Run the application:
    dotnet run
    
Building from Source
cd src
dotnet build
dotnet run --project BlastCMS.MCP.Server
Troubleshooting
Common Issues
  1. Authentication Errors: Verify your BlastCMS Content Key is correct and properly configured
  2. Container Won't Start: Check Docker Desktop is running and you have sufficient resources
  3. Communication Issues: Ensure the container is running in interactive mode with TTY enabled
Docker-Specific Issues
Docker Desktop Not Running

Error: error during connect: Head "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/_ping"

Solution:

  1. Start Docker Desktop application
  2. Wait for Docker to fully initialize (green status in system tray)
  3. Try the command again
Invalid Docker Tag Format

Error: invalid tag 'blastcmsmcp:latest': invalid reference format

Solution:

  1. Ensure the Docker image is built correctly:
    docker build -t blast-cms-mcp .
    
  2. Verify the image exists:
    docker images blast-cms-mcp
    
  3. If the image doesn't exist, rebuild it from the project root directory
Docker Build Issues

Error: Build failures or missing files

Solution:

  1. Ensure you're running the build from the project root (where Dockerfile is located)
  2. Check that all required files are present:
    ls -la Dockerfile
    ls -la src/
    
  3. Clean and rebuild:
    docker system prune -f
    docker build -t blast-cms-mcp .
    
Debugging

To run the container with debugging output:

docker run -it --rm \
  -e BlastCMSConfig__BlastCMSContentKey="your-content-key-here" \
  -e ASPNETCORE_ENVIRONMENT=Development \
  blast-cms-mcp
Quick Setup Verification

To verify your Docker setup is working:

  1. Check Docker is running:

    docker --version
    docker info
    
  2. Build the image:

    docker build -t blast-cms-mcp .
    
  3. Test the container:

    docker run --rm blast-cms-mcp --help
    
Resources
作者情報

0

フォロワー

0

リポジトリ

0

Gist

0

貢献数

スレッド