@neopress/mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -0
- package/dist/bin.cjs +32064 -0
- package/dist/http-bin.cjs +34058 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +33999 -0
- package/integrations/README.md +55 -0
- package/integrations/chatgpt/app-draft.md +96 -0
- package/integrations/claude-code/setup.md +32 -0
- package/integrations/claude-desktop/manifest.json +100 -0
- package/integrations/claude-remote/connector-draft.md +73 -0
- package/integrations/codex/config.example.toml +13 -0
- package/package.json +45 -0
- package/scripts/deploy-cloud-run.sh +183 -0
- package/scripts/prepare-mcpb-package.mjs +55 -0
package/README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# @neopress/mcp
|
|
2
|
+
|
|
3
|
+
Neopress MCP server for first-party AI agents.
|
|
4
|
+
|
|
5
|
+
## Local Stdio
|
|
6
|
+
|
|
7
|
+
Use this for Codex, Claude Code, and other local agents that can start a stdio
|
|
8
|
+
MCP process.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
neopress-mcp
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Auth/session sources match the CLI:
|
|
15
|
+
|
|
16
|
+
- `NEOPRESS_ACCESS_TOKEN`
|
|
17
|
+
- `~/.config/neopress/tokens.json` from `neopress login`
|
|
18
|
+
- `NEOPRESS_SITE_ID` or `neopress sites use <id>`
|
|
19
|
+
- `NEOPRESS_BASE_URL` for staging/local API targets
|
|
20
|
+
|
|
21
|
+
Stdio MCP can use `neopress_asset_upload_file` because it runs on the same
|
|
22
|
+
machine as the agent and can read local file paths.
|
|
23
|
+
|
|
24
|
+
The tool surface includes site/layout/page/collection/entry/form/asset/publish
|
|
25
|
+
operations plus read-only analytics tools for traffic, forms, AI crawler reach,
|
|
26
|
+
and Search Console.
|
|
27
|
+
|
|
28
|
+
## Remote HTTP
|
|
29
|
+
|
|
30
|
+
Use this for hosted MCP clients that connect over Streamable HTTP.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
NEOPRESS_MCP_PUBLIC_URL=https://mcp.neopress.ai \
|
|
34
|
+
NEOPRESS_BASE_URL=https://app.neopress.ai \
|
|
35
|
+
neopress-mcp-http
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Endpoints:
|
|
39
|
+
|
|
40
|
+
| Method | Path | Purpose |
|
|
41
|
+
| ------ | ----------------------------------------- | ------------------------------- |
|
|
42
|
+
| `POST` | `/mcp` | MCP Streamable HTTP endpoint |
|
|
43
|
+
| `GET` | `/.well-known/oauth-protected-resource/mcp` | OAuth protected resource metadata |
|
|
44
|
+
| `GET` | `/.well-known/oauth-authorization-server` | OAuth authorization server metadata |
|
|
45
|
+
| `POST` | `/oauth/register` | Dynamic public client registration |
|
|
46
|
+
| `GET` | `/oauth/authorize` | Supabase OAuth PKCE redirect |
|
|
47
|
+
| `POST` | `/oauth/token` | Supabase PKCE/refresh proxy |
|
|
48
|
+
| `GET` | `/healthz` | Liveness probe |
|
|
49
|
+
| `GET` | `/readyz` | Readiness probe |
|
|
50
|
+
|
|
51
|
+
Remote MCP requires OAuth bearer tokens for `/mcp`. It exposes dynamic client
|
|
52
|
+
registration and PKCE token exchange for clients that support remote MCP OAuth.
|
|
53
|
+
The access token is then used against the Neopress first-party `/api/v1` API,
|
|
54
|
+
so tenant membership remains enforced by the app API.
|
|
55
|
+
|
|
56
|
+
Remote MCP disables `neopress_asset_upload_file` because a hosted server cannot
|
|
57
|
+
read the client's local filesystem. Use `neopress_asset_register` for public
|
|
58
|
+
URLs, or use local stdio MCP for local file uploads.
|
|
59
|
+
|
|
60
|
+
## Environment
|
|
61
|
+
|
|
62
|
+
| Variable | Default | Notes |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| `PORT` | `4002` | Remote HTTP listen port |
|
|
65
|
+
| `HOST` | `0.0.0.0` | Remote HTTP listen host |
|
|
66
|
+
| `NEOPRESS_BASE_URL` | `https://app.neopress.ai` | Neopress API base URL |
|
|
67
|
+
| `NEOPRESS_MCP_PUBLIC_URL` | request-derived | Public issuer/resource origin |
|
|
68
|
+
| `NEOPRESS_MCP_CORS_ORIGINS` | local dev origins | Comma-separated allowlist or `*` |
|
|
69
|
+
| `NEOPRESS_MCP_OAUTH_PROVIDER` | `google` | Supabase OAuth provider |
|
|
70
|
+
| `NEOPRESS_MCP_OAUTH_CLIENT_SECRET` | generated at boot in non-production | Stable HMAC secret for signed dynamic client IDs; required when `NODE_ENV=production` |
|
|
71
|
+
| `NEOPRESS_SUPABASE_URL` | Neopress Supabase project | Supabase Auth base URL |
|
|
72
|
+
| `NEOPRESS_SUPABASE_ANON_KEY` | Neopress anon key | Supabase Auth anon key |
|
|
73
|
+
| `NEOPRESS_MCP_AUTH_MODE` | `oauth` | `none` is dev/test only and rejected in production |
|
|
74
|
+
|
|
75
|
+
## Docker / Cloud Run
|
|
76
|
+
|
|
77
|
+
Build from the repo root:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
docker build -f packages/mcp/Dockerfile -t neopress-mcp-server .
|
|
81
|
+
docker run --rm -p 8080:8080 \
|
|
82
|
+
-e NEOPRESS_MCP_PUBLIC_URL=http://localhost:8080 \
|
|
83
|
+
neopress-mcp-server
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Deploy through Artifact Registry / Cloud Run:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
export NEOPRESS_MCP_OAUTH_CLIENT_SECRET="$(openssl rand -base64 32)"
|
|
90
|
+
export NEOPRESS_MCP_PUBLIC_URL="https://mcp.neopress.ai"
|
|
91
|
+
pnpm deploy:mcp
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The deploy script defaults to project `inblog-ver-2`, region `us-west1`,
|
|
95
|
+
repository `neopress`, and service `neopress-mcp-server`.
|
|
96
|
+
|
|
97
|
+
## Official Client Drafts
|
|
98
|
+
|
|
99
|
+
Submission-ready drafts live under `integrations/`:
|
|
100
|
+
|
|
101
|
+
- `integrations/codex/config.example.toml` for Codex CLI/IDE MCP config.
|
|
102
|
+
- `integrations/claude-code/setup.md` for Claude Code stdio/HTTP setup.
|
|
103
|
+
- `integrations/claude-desktop/manifest.json` for Claude Desktop MCPB.
|
|
104
|
+
- `integrations/claude-remote/connector-draft.md` for Claude remote MCP.
|
|
105
|
+
- `integrations/chatgpt/app-draft.md` for ChatGPT Developer Mode.
|
|
106
|
+
|
|
107
|
+
Stage a Claude Desktop MCPB directory after building:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pnpm --filter @neopress/mcp build
|
|
111
|
+
pnpm --filter @neopress/mcp mcpb:stage
|
|
112
|
+
pnpm dlx @anthropic-ai/mcpb pack packages/mcp/dist/mcpb/neopress
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Do not submit the remote connector drafts until the production MCP origin,
|
|
116
|
+
legal/support URLs, review workspace, and real client OAuth scans are verified.
|