WordPress MCP Safe
A safe MCP server for WordPress staging that enables reading content, creating drafts, analyzing SEO, and generating reports without publishing or deleting.
README
WordPress MCP Safe
Server MCP locale per gestire WordPress in modo sicuro, controllato e orientato alla gestione editoriale.
Collega Cursor (o qualsiasi client MCP) al tuo WordPress staging per leggere contenuti, creare bozze, analizzare SEO e generare report — senza pubblicare, cancellare o eseguire operazioni amministrative.
Cursor/LLM ──stdio──► MCP Server (locale) ──HTTPS──► WordPress Staging
│ ai_editor / Editor
▼
logs/actions.log
Perché questo progetto
| Problema | Soluzione |
|---|---|
| L'AI pubblica contenuti non revisionati | Solo bozze e proposte, mai publish |
| L'AI modifica il sito live | Staging obbligatorio, blocco all'avvio |
| L'AI cancella contenuti | Nessun tool delete/trash |
| L'AI installa plugin o modifica temi | Ruolo Editor, nessun endpoint admin |
| Nessuna tracciabilità | Log locale di ogni operazione |
Quick start
git clone <repository-url> mcp-wordpress
cd mcp-wordpress
npm install
cp .env.example .env
# Modifica .env con il tuo staging
npm run build
npm test
Configura Cursor
Aggiungi in ~/.cursor/mcp.json:
{
"mcpServers": {
"wordpress-staging": {
"command": "node",
"args": ["/percorso/assoluto/a/mcp-wordpress/dist/index.js"],
"env": {
"WORDPRESS_BASE_URL": "https://staging.example.com",
"WORDPRESS_USERNAME": "ai_editor",
"WORDPRESS_APPLICATION_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
"WORDPRESS_ENVIRONMENT": "staging"
}
}
}
}
Riavvia Cursor. Chiedi: "Usa wp_get_site_info per verificare la connessione".
Tool disponibili (22)
| Categoria | Tool | Descrizione |
|---|---|---|
| Lettura | wp_get_site_info |
Info sito |
wp_list_posts, wp_list_pages |
Elenco contenuti | |
wp_get_post, wp_get_page |
Dettaglio per ID | |
wp_search_content |
Ricerca keyword | |
wp_get_categories, wp_get_tags |
Tassonomie | |
wp_get_media |
Media library | |
| Scrittura | wp_create_draft_post, wp_create_draft_page |
Crea bozze |
wp_update_draft_post, wp_update_draft_page |
Aggiorna bozze | |
wp_upload_media |
Upload file | |
wp_create_seo_proposal |
Proposta SEO | |
wp_create_revision_note |
Nota di revisione | |
| Analisi | wp_analyze_page_seo, wp_analyze_post_seo |
Audit SEO |
wp_check_internal_links |
Verifica link | |
wp_generate_content_report |
Report contenuti | |
wp_find_old_content |
Contenuti obsoleti | |
wp_suggest_content_improvements |
Suggerimenti |
Dettagli ed esempi: docs/tools.md
Esempio d'uso
"Analizza la pagina Affitto laboratorio smielatura e prepara una versione migliorata SEO"
wp_analyze_page_seo→ analisi headings, keywords, linkwp_create_seo_proposalconcreate_draft: true→ bozza su staging- Restituisce
edit_urlepreview_url— nulla viene pubblicato
Documentazione
| Guida | Contenuto |
|---|---|
| 📖 Indice docs | Panoramica documentazione |
| 🏗 Architettura | Design e layer di sicurezza |
| ⚙️ Configurazione | Variabili .env |
| 🔧 Setup WordPress | Utente, Application Password |
| 🖥 Setup Cursor | Configurazione MCP |
| 🔒 Sicurezza | Azioni consentite/vietate |
| 📋 Workflow | Scenari operativi |
| 🧪 Testing | Suite test e coverage |
| 🔌 API Reference | Mapping REST API |
| 🩺 Troubleshooting | Risoluzione problemi |
Struttura progetto
mcp-wordpress/
├── src/
│ ├── index.ts # Entry point
│ ├── config.ts # Validazione ambiente
│ ├── wordpress/ # Client REST (posts, pages, media)
│ ├── mcp/ # Server e tool MCP
│ ├── safety/ # Guardie e permessi
│ ├── seo/ # Analisi SEO
│ ├── logging/ # Audit log
│ └── utils/ # Utility HTML/testo
├── tests/ # 135 test, 100% coverage
├── docs/ # Documentazione completa
├── logs/ # actions.log (auto-generato)
└── .cursor/mcp.json.example # Template configurazione
Script npm
| Comando | Descrizione |
|---|---|
npm run build |
Compila TypeScript → dist/ |
npm run dev |
Sviluppo con hot reload |
npm start |
Avvia server MCP |
npm test |
Esegue test |
npm run test:coverage |
Test con coverage 100% |
npm run lint |
Verifica tipi TypeScript |
Sicurezza in sintesi
- ✅ Solo ambiente staging (blocco all'avvio)
- ✅ Solo utente Editor (non admin)
- ✅ Solo bozze e proposte
- ✅ Contenuti pubblicati protetti (nuova bozza, no overwrite)
- ✅ Log locale senza credenziali
- ❌ Nessun publish, delete, plugin, temi, utenti
Dettagli: docs/security.md
Requisiti
- Node.js >= 18
- WordPress self-hosted 5.6+ con REST API
- Ambiente staging dedicato
- Application Password per utente Editor
Licenza
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.