Compare commits

...

2 commits

Author SHA1 Message Date
2e29aa472a improve readme
Some checks are pending
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Waiting to run
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to TestPyPI (push) Blocked by required conditions
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Blocked by required conditions
2025-09-24 00:06:47 -03:00
73ba32a0a1 Add Claude Code installation 2025-09-24 00:01:33 -03:00

106
README.md
View file

@ -2,11 +2,30 @@
A comprehensive Model Context Protocol (MCP) server for Ghost CMS, providing both read-only Content API and read/write Admin API access through FastMCP.
## ⚡ Quick Start
```bash
# Install and run locally (requires Docker)
git clone https://git.thenets.org/luiz/ghost-mcp.git
cd ghost-mcp
make setup # Starts Ghost, creates API keys, runs tests
make run # Start the MCP server
```
For Claude Code:
```bash
claude mcp add ghost --scope user \
-e GHOST_URL=http://localhost:2368 \
-e GHOST_CONTENT_API_KEY=your_key_here \
-e GHOST_ADMIN_API_KEY=your_key_here \
-- uvx --refresh --from git+https://git.thenets.org/luiz/ghost-mcp.git ghost-mcp
```
## 🌟 Getting Started
First, install the Ghost MCP server with your client.
### Standard Configuration
Standard config works in most of the tools:
For most MCP clients, use this configuration:
```json
{
@ -53,7 +72,7 @@ make setup # This will start Ghost, create tokens, and configure everything
- **Configuration Management**: Environment variables with precedence
- **Development Tools**: Complete Docker setup and automation scripts
## 🚀 Quick Start
## 🛠️ Development
### Prerequisites
@ -64,18 +83,18 @@ make setup # This will start Ghost, create tokens, and configure everything
```bash
# Clone the repository
git clone <repository-url>
git clone https://git.thenets.org/luiz/ghost-mcp.git
cd ghost-mcp
# Complete setup from scratch
make setup
# Or step by step:
make install-uv # Install uv package manager
make install-uv # Install uv package manager
make install # Install Python dependencies
make start-ghost # Start Ghost and database
make setup-tokens # Extract API keys and create .env
make test # Test the implementation
make test # Test the implementation
```
### Usage
@ -94,6 +113,42 @@ make status
make logs
```
### Project Structure
```
ghost-mcp/
├── src/ghost_mcp/
│ ├── server.py # FastMCP server entry point
│ ├── client.py # Ghost API client
│ ├── config.py # Configuration management
│ ├── auth/ # Authentication modules
│ ├── tools/
│ │ ├── content/ # Content API tools
│ │ └── admin/ # Admin API tools
│ ├── types/ # Type definitions
│ └── utils/ # Utilities
├── scripts/ # Setup and test scripts
├── contracts/ # API documentation
├── docker-compose.yml # Ghost + MySQL setup
├── Makefile # Development commands
└── pyproject.toml # Python project config
```
### Available Commands
```bash
make help # Show all commands
make setup # Complete setup from scratch
make install # Install dependencies with uv
make start-ghost # Start Ghost containers
make setup-tokens # Generate API keys
make test # Run tests
make test-connection # Test API connectivity
make run # Run MCP server
make status # Check system status
make clean # Clean up everything
```
## 📋 Available MCP Tools
### Content API Tools (Read-only)
@ -157,43 +212,6 @@ LOG_STRUCTURED=true
LOG_REQUEST_ID=true
```
## 🛠️ Development
### Project Structure
```
ghost-mcp/
├── src/ghost_mcp/
│ ├── server.py # FastMCP server entry point
│ ├── client.py # Ghost API client
│ ├── config.py # Configuration management
│ ├── auth/ # Authentication modules
│ ├── tools/
│ │ ├── content/ # Content API tools
│ │ └── admin/ # Admin API tools
│ ├── types/ # Type definitions
│ └── utils/ # Utilities
├── scripts/ # Setup and test scripts
├── contracts/ # API documentation
├── docker-compose.yml # Ghost + MySQL setup
├── Makefile # Development commands
└── pyproject.toml # Python project config
```
### Available Commands
```bash
make help # Show all commands
make setup # Complete setup from scratch
make install # Install dependencies with uv
make start-ghost # Start Ghost containers
make setup-tokens # Generate API keys
make test # Run tests
make test-connection # Test API connectivity
make run # Run MCP server
make status # Check system status
make clean # Clean up everything
```
## 🐳 Docker Environment
@ -248,7 +266,7 @@ make test-connection
make test
# Test specific functionality
python scripts/test-connection.py
make test-connection
```
## 📝 Logging