NexusPress Draft MCP
# NexusPress Draft MCP
A JavaScript MCP server for creating and maintaining NexusPress article drafts from an MCP-compatible ChatGPT, Claude, or desktop client.
This server is draft-only. It automatically fills dependent article fields, saves changes immediately, and never publishes.
The MCP does not bypass provider quotas. ChatGPT or Claude supplies the writing/image capability through the MCP host; NexusPress stores the resulting text, image URL, and image prompt as a draft.
## Setup
```bash
cd mcp-server
npm install
```
Set these environment variables in the MCP host configuration:
```env
NEXUSPRESS_API_URL=https://your-nexuspress-backend.example.com
NEXUSPRESS_ADMIN_TOKEN=your-nexuspress-admin-jwt
```
For local development, use `http://localhost:3001` for `NEXUSPRESS_API_URL`.
## Run
```bash
npm start
```
## MCP Tools
- `list_publications`: discover site slugs and publication names.
- `list_categories`: list categories for one publication.
- `create_article_draft`: create a complete draft from title and content.
- `update_article_draft`: update title/content and automatically recalculate dependent fields.
- `get_article_draft`: retrieve an article for review.
- `check_draft_seo`: run a local pre-publish SEO check.
Generated draft data includes title, slug, excerpt, SEO title, SEO description, tags, cover image URL, image prompt, author, author role, category, canonical URL, reading time, and draft/noindex state.
## MCP host configuration
The repository includes a VS Code MCP configuration at `.vscode/mcp.json`. Configure the environment values there or in the MCP host's secure environment store.
Do not commit admin tokens or provider keys.
## get NEXUSPRESS_ADMIN_TOKEN from browser
localStorage.getItem('nexus_admin_token')
## Vercel Deployment
This repository is ready to be deployed to Vercel as a remote MCP server using Server-Sent Events (SSE).
1. Move this `mcp-server` folder to its own repository on GitHub.
2. Go to your Vercel Dashboard and click **Add New... > Project**.
3. Import the repository.
4. Add the following Environment Variables in Vercel:
- `NEXUSPRESS_API_URL` (e.g. `https://your-nexuspress-api.run.app`)
- `NEXUSPRESS_ADMIN_TOKEN` (the JWT token you retrieved from your browser)
5. Click **Deploy**.
Vercel will automatically detect the `vercel.json` file and serve the Express SSE endpoints.
Once deployed, you can connect your remote MCP client to your new Vercel URL using SSE:
- **SSE URL:** `https://your-vercel-deployment.vercel.app/api/sse`
- **Message URL:** `https://your-vercel-deployment.vercel.app/api/messages`
> **Note on Vercel Serverless Limits:** Because MCP over SSE requires a persistent connection, this setup runs inside Vercel's Serverless environment. If you notice connection drops during very long ChatGPT responses, consider deploying this Express server (`npm run start:sse`) to a persistent container service like Render, Railway, or Google Cloud Run.
TDQS
Scored across 7 tools
Each tool targets a distinct resource+action (list publications, list categories, get/create/update draft, SEO check, image upload), so an agent can tell them apart. The only mild overlap is upload_image_from_url, which duplicates image-attachment capabilities already embedded in create_article_draft and update_article_draft.
Predominantly a verb_noun snake_case pattern (list_publications, create_article_draft, update_article_draft, get_article_draft, upload_image_from_url). check_draft_seo deviates slightly with a verb_noun_noun ordering, but overall it's readable and predictable.
Seven tools is well-scoped for a draft-focused server, and each tool earns its place covering listing, drafting, review, validation, and asset handling.
The draft lifecycle (create, update, get) plus SEO check and image upload is solidly covered. Minor gaps exist: no listing of existing drafts and no delete_article_draft, though publishing is intentionally out of scope for a 'Draft' server.