"Codebase.blog auto-posting via MCPorter + OAuth. Trigger words: 자동포스팅, 자동포스팅해, 포스팅해줘, 블로그 포스팅해줘, 글 발행해줘, create post, publish post. Route rule: skill로 -> mcporter (/mcp-remote), mcp로 -> direct MCP (/mcp), ambiguous defaults to skill."
Resources
3Install
npx skillscat add beyondeth/codebase-skills/codebase-skill Install via the SkillsCat registry.
Codebase.blog Auto-Posting (MCP + MCPorter)
This skill is OAuth-first and intended to be used via mcporter so non-developers can run blog auto-posting as plain commands.
What This Skill Does
- Authenticate once via OAuth (browser)
- Call MCP tools like normal commands
- Publish posts with
create_post - Optional image upload via presigned URL (
get_image_upload_url->curl PUT->finalize_uploaded_image)
Trigger Phrases
- 자동포스팅
- 자동포스팅해
- 포스팅해줘
- 블로그 포스팅해줘
- 글 발행해줘
- create post
- publish post
Routing Contract (Skill vs MCP Direct)
Use explicit user intent to choose one execution path. Do not mix both in one run.
Route Selection
skillroute (viamcporter): if user sayscodebase-skill,skill 사용,skill로,스킬로, or uses style flags like--podcast,--research,--tutorial.mcproute (direct MCP tools): if user saysmcp로,MCP tool,codebase-blog-mcp,툴로 직접.- ambiguous phrase only (for example:
자동포스팅해): default toskillroute. - user can always override by adding one explicit token:
skill로ormcp로.
Route Guard
Before create_post, always run check_auth and validate the expected auth mode:
skillroute expected output:인증 방식 : OAuth 2.1mcproute expected output:인증 방식 : API Key
If mismatch:
- retry once on the correct route
- if still mismatched, stop and report route mismatch (do not post)
Preflight Log Line (required)
Print one route line before tool execution:
- skill route:
[Route] mode=skill transport=mcporter endpoint=/mcp-remote alias=codebase-blog-oauth - mcp route:
[Route] mode=mcp transport=direct endpoint=/mcp server=codebase-blog-mcp
Setup (Once)
# DEV (DEFAULT for this skill)
# - Safe default: prevents accidental production posting while testing.
npx -y mcporter config add codebase-blog-oauth \
--url http://localhost:3002/mcp-remote \
--auth oauth \
--allow-http \
--oauth-redirect-url http://127.0.0.1:33334/callback \
--scope project
# PROD (explicit opt-in)
npx -y mcporter config add codebase-blog-oauth-prod \
--url https://mcp.codebase.blog/mcp-remote \
--auth oauth \
--oauth-redirect-url http://127.0.0.1:33333/callback \
--scope home
# Browser OAuth (first time only)
npx -y mcporter auth codebase-blog-oauthVerify (Always First)
Important: treat
check_authas the real success gate. Do not rely on the browser page text alone.
npx -y mcporter call codebase-blog-oauth.check_authSafe Gate (Recommended)
mcporter may print errors without a non-zero exit code. Gate on the presence of "error" in the output before posting.
AUTH_OUT=$(npx -y mcporter call codebase-blog-oauth.check_auth --output json 2>&1 || true)
echo "$AUTH_OUT"
if echo "$AUTH_OUT" | grep -q '"error"'; then
echo "[STOP] OAuth verification failed. create_post not executed."
exit 1
fiPublish
npx -y mcporter call 'codebase-blog-oauth.create_post(
title: "자동포스팅 테스트",
content_markdown: "## Hello\\n\\nmcporter로 발행한 글입니다.",
category: "Tech",
tags: ["mcp","mcporter","automation"]
)'Writing Style Guide (Optional)
npx -y mcporter call 'codebase-blog-oauth.get_writing_style_guide(style: "default")'Image Upload (Optional)
# 1) ask for presigned URL
npx -y mcporter call 'codebase-blog-oauth.get_image_upload_url(mimeType: "image/webp", fileSize: 245760)'
# 2) upload with curl PUT (use uploadUrl from step 1)
curl -X PUT -H "Content-Type: image/webp" -T ./cover.webp "UPLOAD_URL_FROM_PREVIOUS_STEP"
# 3) finalize upload
npx -y mcporter call 'codebase-blog-oauth.finalize_uploaded_image(fileKey: "uploads/...", mimeType: "image/webp", fileSize: 245760)'Troubleshooting
- If the login UI does not appear: you may already be logged in. Try a private window or
npx -y mcporter auth codebase-blog-oauth --reset. - If you see
SSE error: Invalid content type, expected "text/event-stream"duringmcporter auth: tokens may still be saved. Runcheck_authto confirm. - If port
33333is in use: pick another fixed callback port and re-add the server.