Skip to main content
Glama
jith-jstrange

Lokha MCP Server

README.md
# Lokha MCP Server (v1)

Lokha MCP is a production-ready, modular Model Context Protocol (MCP) server hosted on Cloudflare Workers. It acts as the central integration layer between AI assistants (such as Gemini Spark) and every service in the Lokha ecosystem.

The initial release features **Ghost CMS** integration, with modular architecture ready for expansion to GitHub, Google Workspace, Supabase, Slack, Notion, and more.

---

## 🚀 Architecture

```text
                          LOKHA MCP
                    (Cloudflare Worker)

               ┌─────────────────────────────┐
               │        MCP Server           │
               │                             │
               │  Registry                   │
               │  Authentication             │
               │  Tool Discovery             │
               │  Provider Manager           │
               └─────────────┬───────────────┘
                             │
     ┌─────────────┬──────────┼──────────────┬──────────────┐
     │             │          │              │              │
   Ghost       GitHub     Google       Supabase       Slack
 Provider     Provider    Provider      Provider      Provider
     │
     ▼
 Your Self-hosted Ghost CMS
```

---

## 🛠️ Ghost CMS Provider Tools (12 Tools)

1. `ghost.create_post` - Create a new published or draft post
2. `ghost.create_draft` - Create a draft post
3. `ghost.publish_post` - Publish an existing draft post by ID
4. `ghost.update_post` - Update an existing post (title, content, tags, excerpt, status)
5. `ghost.delete_post` - Delete a post by ID
6. `ghost.list_posts` - List posts with pagination and NQL filter query support
7. `ghost.list_drafts` - List draft posts
8. `ghost.get_post` - Fetch single post details by ID or slug
9. `ghost.upload_image` - Upload remote image asset to Ghost CMS media store
10. `ghost.list_tags` - List site tags
11. `ghost.list_authors` - List site authors
12. `ghost.schedule_post` - Schedule post publication for a specific future ISO date

---

## 🔐 Multi-Site Ghost Configuration

Lokha MCP supports managing multiple Ghost instances (e.g. `personal`, `lokha`, `client1`) from a single Worker deployment:

```toml
[vars]
DEFAULT_GHOST_SITE = "personal"

# Environmental secrets set via `wrangler secret put`:
# GHOST_URL_PERSONAL
# GHOST_ADMIN_KEY_PERSONAL
# GHOST_URL_LOKHA
# GHOST_ADMIN_KEY_LOKHA
```

---

## 💻 Local Development

```bash
# Install dependencies
npm install

# Type check
npm run build

# Run local worker dev server
npm run dev
```

---

## 📦 Cloudflare Deployment

```bash
# Set secrets
npx wrangler secret put GHOST_URL_PERSONAL
npx wrangler secret put GHOST_ADMIN_KEY_PERSONAL

# Deploy to Cloudflare Workers
npm run deploy
```