Skip to content

feat(mcp): serve WordPress tools over HTTPS - #6

Merged
itsjeremyjohnson merged 2 commits into
mainfrom
feat/https-mcp-server
Sep 23, 2026
Merged

itsjeremyjohnson merged 2 commits into
mainfrom
feat/https-mcp-server

Conversation

@itsjeremyjohnson

@itsjeremyjohnson itsjeremyjohnson commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add a stateless Streamable HTTP MCP server with bearer authentication and a fixed WordPress tool catalog. Seven read tools are available by default; four write tools require an explicit setting.
  • Require pinned SSH host keys for MCP calls, keep the legacy wpgo CLI and its existing SSH behavior, and prevent WP-CLI flag injection through tool arguments.
  • Add an isolated Linode Compose deployment behind the existing HTTPS Traefik listener. The token and site metadata stay outside Git.

Verification

  • make ci on Go 1.25.1: formatting, lint with zero issues, and race-enabled unit tests passed.
  • make build and git diff --check passed.
  • Formal review against main identified two blockers; commit 5f25e8b resolves both. A focused review of that commit found no new defects.
  • Live HTTPS checks at https://mcp-google.builtbyrobben.com/wpssh/mcp: MCP discovery and seven read tools succeeded; core_version returned 7.1.1 for comoexteriors; a WP-CLI flag-shaped argument was rejected; unauthenticated requests returned 401. A foreign Origin returned 403 in a separate live check. The existing Google MCP route still returned its expected 401.

Rollout

The read-only server is running on the Linode. Write tools remain disabled and were not exercised against a live WordPress site. The bearer token is stored on the VPS at /home/jdjb78/deploy/wpssh-mcp/secrets/token.


🤖 Authored by GPT-6 Sol for Jeremy


Note

High Risk
Adds an internet-facing authenticated API that executes remote WP-CLI over SSH, with optional write tools; mistakes in token handling, TLS/proxy settings, or tool args could affect production WordPress sites.

Overview
Introduces wpssh-mcp, a stateless Streamable HTTP MCP server on /mcp with bearer auth (env or secret file), TLS/proxy safeguards, and a fixed WordPress tool catalog (seven read tools by default; four write tools behind WPSMCP_ALLOW_WRITES). Tool calls run fresh WP-CLI over SSH via a new internal/mcpserver layer, with argument checks to block WP-CLI flag injection.

Build and packaging now default to wpssh-mcp (make build); wpgo stays as the legacy CLI (make build-cli). Releases, Homebrew tests, and docs are updated accordingly, plus Dockerfile.mcp, .dockerignore, and deploy/linode-compose.yaml for a hardened Traefik-backed deployment.

SSH pooling gains NewVerifiedPool (pinned known_hosts for MCP only—the CLI still uses NewPool), identity-aware cache keys, rate-limiter slots held until connection release, and safer idle reuse/cancellation behavior.

Reviewed by Cursor Bugbot for commit 5f25e8b. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b1cf6b49-615d-43d6-8c46-7ec1579db3cf)

@itsjeremyjohnson
itsjeremyjohnson merged commit d0c5fb8 into main Sep 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant