@prompthub/mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@prompthub/mcp publish the current session to PromptHub"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
prompthub-mcp
MCP server for PromptHub. Publish, fetch, list, update and search prompt repositories from Claude Code or Codex.
1. Get a token
Sign in at https://www.awesome-prompt.com → Settings → API tokens → create a token. Copy the ph_… value (shown once).
Related MCP server: MCP Server
2. Configure
Either set an environment variable:
export PROMPTHUB_TOKEN=ph_xxx
# optional, defaults to https://www.awesome-prompt.com
export PROMPTHUB_BASE_URL=https://www.awesome-prompt.com
# optional — force which model search/recommend/publishing prefer (a registry slug,
# e.g. claude-sonnet-4-6). Overrides host auto-detection; handy for multi-model hosts.
export PROMPTHUB_MODEL=claude-sonnet-4-6…or create ~/.prompthub/config.json:
{ "token": "ph_xxx", "baseUrl": "https://www.awesome-prompt.com", "model": "claude-sonnet-4-6" }Environment variables take precedence over the file.
3. Register the server
The server installs straight from this public GitHub repo — no npm registry, no token to pull it.
Recommended — install once, then point at the prompthub-mcp binary (fast startup; builds on install):
npm i -g github:LionelHao/prompthub-mcp
claude mcp add prompthub --env PROMPTHUB_TOKEN=ph_xxx -- prompthub-mcpZero-install alternative — let npx fetch + build the repo on demand (slower cold start, always tracks main):
claude mcp add prompthub --env PROMPTHUB_TOKEN=ph_xxx -- npx -y github:LionelHao/prompthub-mcpCodex — add to ~/.codex/config.toml. After npm i -g github:LionelHao/prompthub-mcp:
[mcp_servers.prompthub]
command = "prompthub-mcp"
env = { PROMPTHUB_TOKEN = "ph_xxx" }Or zero-install (npx fetches + builds on demand):
[mcp_servers.prompthub]
command = "npx"
args = ["-y", "github:LionelHao/prompthub-mcp"]
env = { PROMPTHUB_TOKEN = "ph_xxx" }4. Tools
Tool | What it does |
| Verify the token; show your handle/name |
| Search public repos by keyword (model-aware — see below) |
| Recommend high-usage repos for a task (model-aware) |
| Fetch one repo (owner/name) with its file tree |
| List your repos, or a user's public repos |
| Create a repo from explicit fields |
| Full-replace one of your repos |
| Distill the current session into a reusable repo and publish |
| Show the exact |
| Read the complete bundled Workflow Runner Contract (no token or network) |
Authoring workflows and runtime runs
PromptHub uses “workflow” at two distinct layers:
An authoring workflow is the reusable static DAG stored in a repository as a
workflowfile. The repo create/get/update/publish tools work with this authoring format.The Workflow Runner Contract governs an agent executing a local run package generated by PromptHub Desktop: frozen
blueprint.json, append-onlyevents.jsonl, andartifacts/.
The canonical public Runner Contract lives in the prompt-hub repository. This package ships a byte-identical,
hash-pinned read-only mirror under docs/contracts/workflow-runner/. Any MCP host can call
prompthub_describe_runner_protocol without a PromptHub token or network access to read the full human-readable
contract, including compatibility, preflight, lifecycle, resume, rerun, and safety rules.
The MCP server only describes this runtime contract. It does not create or execute run packages, write events, monitor Desktop sessions, or make chat-only hosts compatible with local filesystem execution.
Model-aware search & publishing
The server detects which AI model you're working with and tailors results to it — no setup needed:
Detection — inferred from the MCP host (
clientInfo): Claude Code →claude-sonnet-4-6, Codex →gpt-5-5. Priority: per-callmodelarg >PROMPTHUB_MODELenv > host. Unknown / multi-model hosts (e.g. Cursor) fall back toPROMPTHUB_MODEL.Search & recommend —
prompthub_search/prompthub_recommendrank prompts tagged for your model first — a preference, not a filter (model-agnostic prompts still appear). Results carry anappliedModelfield + a short note to relay to the user.Publishing —
prompthub_create_repo/prompthub_publish_session/prompthub_update_repoauto-tag your prompt's text nodes with the current model (only nodes without an explicit model; image/video nodes are left untouched). The reply notes how many nodes were tagged.Override anytime — tell the assistant "find Gemini prompts" (per-call
model), or setPROMPTHUB_MODEL. Runprompthub_whoamito see the detected host + resolved model.
Model slugs/labels come from the live registry at GET /api/v1/models.
5. First run
Confirm it's wired up — ask your assistant:
"Use prompthub_whoami to check my PromptHub login."
You should see your handle. Then publish:
"Publish the prompt we just wrote to PromptHub as a private repo called
my-first-prompt."
The assistant will call prompthub_publish_session and reply with the new repo URL (e.g. https://www.awesome-prompt.com/@you/my-first-prompt). If it's unsure of the format, it can call prompthub_describe_file_format first.
Organize a prompt before publishing
prompthub_organize_prompt(无参,无需令牌)取回「整理提示词」方法论:把原始 prompt 重写得更清晰,
并按 PromptHub 的 {{变量}} 规范模板化,便于他人编辑替换。发布前先调它,再用 create_repo /
publish_session 发布。
作为 Claude Code plugin 安装
本仓同时是 Claude Code plugin(声明了 MCP server + 原生 prompt-organize skill):
claude --plugin-dir /path/to/prompthub-mcp # 本地
# 或 /plugin install <git-url>更新方法论文本后,重新生成 SKILL.md:
PROMPTHUB_BASE_URL=https://www.awesome-prompt.com npm run sync-skillLicense
MIT
Available Tools
19 toolsprompthub_create_repoPromptHub: create a repoA
Create a new PromptHub repository from a full set of fields. Use this when the user explicitly provides repo content to publish. (To publish the CURRENT coding session, prefer prompthub_publish_session.) Call prompthub_describe_file_format if unsure of the files[] shape.
Inputs: files (required), readme (required), topics (required), repoName (required), +2 more.
prompthub_delete_artifactPromptHub: delete an artifactA
Delete one artifact from a repo by its id (get ids from prompthub_get_repo's artifacts[]). Returns 'not found' if it does not exist or you cannot access it. Use this + republish to replace an artifact (the server appends, it does not de-duplicate).
Inputs: name (required), owner (required), artifactId (required).
prompthub_delete_referencePromptHub: delete a prompt referenceA
Delete one PromptReference input asset by id. Get ids from prompthub_get_repo promptReferences[]. A 404 means it does not exist or you cannot access it.
Inputs: name (required), owner (required), referenceId (required).
prompthub_delete_repoPromptHub: delete a repoA
Delete one repo you own by owner/name. This permanently removes the repo rows and asks PromptHub to clean stored artifact/reference objects. A 404 means the repo does not exist or you cannot access it.
Inputs: name (required), owner (required).
prompthub_describe_artifact_formatPromptHub: describe artifact formatA
Explain PromptHub ARTIFACTS (generated outputs in the repo's 产物/Artifacts panel) vs repo FILES (the prompt itself), and how to publish each artifact type (inline MARKDOWN/HTML vs binary upload). Call this when the user asks to publish a generated result / output / 产物.
Inputs: no named parameters.
prompthub_describe_file_formatPromptHub: describe file formatA
Return the exact JSON shapes (with examples) for repo files[]: the text / conversation / workflow content kinds and the repoName/path naming rules. Call this before create_repo / update_repo / publish_session if unsure how to build files[]. To publish a GENERATED RESULT (doc/web page/image/file) instead of the prompt, call prompthub_describe_artifact_format.
Inputs: no named parameters.
prompthub_describe_reference_formatPromptHub: describe reference formatA
Explain PromptHub PromptReferences (input assets) vs artifacts (generated outputs), and the target fields for TEXT_FILE / WORKFLOW_NODE / CONVERSATION_TURN bindings.
Inputs: no named parameters.
prompthub_describe_runner_protocolPromptHub: describe workflow runner protocolA
Return the complete bundled public Workflow Runner Contract for agentic hosts that execute PromptHub Desktop run packages. No token or network request is required. This tool only describes the protocol; it does not create, execute, write, or monitor a run package.
Inputs: no named parameters.
prompthub_get_repoPromptHub: get a repoA
Fetch one repository by owner handle and name, including its README and full file tree. Returns 'not found' if it does not exist or you cannot access it.
Inputs: name (required), owner (required).
prompthub_list_reposPromptHub: list reposA
List repositories. Omit 'owner' to list your own repos (including private). Provide a handle to list that user's public repos.
Inputs: owner.
prompthub_organize_promptPromptHub: organize a prompt before publishingA
Call this FIRST whenever the user wants to upload, publish, share, or save a prompt to PromptHub (before create_repo / publish_session / update_repo). Returns the prompt-organize methodology: a step-by-step guide to (1) rewrite the user's raw prompt for clarity and (2) convert the genuinely reusable parts into PromptHub's {{variable}} template syntax (single-line, ... for multi-line, =a|b|c for choices) so others can edit and replace them. Apply the returned guide to the user's prompt, CONFIRM the variable list with the user, then publish. Skip only if the prompt is already a clean, templatized prompt the user explicitly does not want changed. No token required — safe to call before the user has authenticated.
Inputs: no named parameters.
prompthub_publish_artifactPromptHub: publish an inline artifactA
Publish a GENERATED text RESULT (Markdown or HTML, ≤256 KiB) to a repo's Artifacts (产物) panel. This is NOT the prompt itself — for the prompt use create_repo/publish_session; for binary files (image/video/pdf) use prompthub_upload_artifact. The server APPENDS (no de-dup); to REPLACE, prompthub_get_repo + prompthub_delete_artifact the old id first. See prompthub_describe_artifact_format.
Inputs: name (required), type (required), owner (required), content (required), +5 more.
prompthub_publish_sessionPromptHub: publish this sessionA
Distill the CURRENT coding session into a reusable PromptHub repository and publish it as a NEW repo. You (the assistant) must gather the relevant turns from this conversation yourself and shape them into one or more files — this tool cannot read the conversation on its own. Choose the file type that fits the session: - a single refined reusable prompt → a 'text' file (graph with exactly one node whose promptText holds the prompt); - a valuable multi-turn back-and-forth → a 'conversation' file with turns of { userPrompt, aiSummary? }; - a multi-step / multi-model pipeline → a 'workflow' file (graph of nodes + edges). Call prompthub_describe_file_format for the exact file shapes if unsure. STRIP secrets, API keys, absolute file paths, and project-specific noise — capture the reusable essence, not the raw transcript. 'visibility' is REQUIRED: choose 'private' unless the user clearly wants it public. If the user already handed you finished, structured repo content (with topics/README), use prompthub_create_repo instead.
Inputs: files (required), repoName (required), visibility (required), description.
prompthub_recommendPromptHub: recommend prompts for a taskA
Recommend proven, high-usage prompt repos from PromptHub for the user's current task. PROACTIVELY call this when the user wants to write or improve a prompt — community-tested prompts are often better starting points than drafting from scratch. Extract 1–5 short keyword variants from the task (include both the user's language and English) and pass them as queries. Present the top picks to the user with their links.
Inputs: queries (required), limit, model.
prompthub_searchPromptHub: search reposA
Search public PromptHub repositories by keyword. Returns repo summaries (no file trees). An empty query returns no results.
Inputs: q (required), sort, type, model.
prompthub_update_repoPromptHub: update a repo (full replace)A
Replace ALL content of one of YOUR repositories with the provided body. This is a FULL REPLACE, not a partial merge — any file you omit is DELETED. To change part of a repo, first call prompthub_get_repo, edit the returned fields, then send the COMPLETE set back (map the returned name to repoName; drop read-only fields like counts/createdAt; resend every file). The owner must be your own handle, otherwise the server returns not found.
Inputs: name (required), files (required), owner (required), readme (required), +4 more.
prompthub_upload_artifactPromptHub: upload a binary artifactA
Upload a local BINARY file (image/video/pdf) as a generated artifact to a repo's Artifacts (产物) panel. Pass a local file path; this tool reads it and uploads directly. type defaults from the extension (.png/.jpg/.gif/.webp→IMAGE ≤10MB, .mp4/.webm→VIDEO ≤100MB, .pdf→FILE ≤25MB). For inline Markdown/HTML use prompthub_publish_artifact. The server APPENDS (no de-dup); to REPLACE, prompthub_get_repo + prompthub_delete_artifact the old id first. See prompthub_describe_artifact_format.
Inputs: file (required), name (required), owner (required), role, +5 more.
prompthub_upload_referencePromptHub: upload a prompt referenceA
Upload a local file as a PromptReference input asset, bound to a prompt unit. This is NOT a generated artifact. Set filePath to an existing repo file path; targetKind is TEXT_FILE, WORKFLOW_NODE, or CONVERSATION_TURN. targetId is required for node/turn targets. See prompthub_describe_reference_format.
Inputs: file (required), name (required), owner (required), filePath (required), +4 more.
prompthub_whoamiPromptHub: who am IA
Verify the configured PromptHub token and return the authenticated user's handle and name. Use this to confirm which account prompts will be published under.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools target a clearly distinct resource+action (repo CRUD, artifact publish/upload/delete, reference upload/delete), and descriptions explicitly disambiguate close pairs like create_repo vs publish_session and publish_artifact vs upload_artifact. The main friction is the cluster of four prompthub_describe_* schema-doc tools (file/artifact/reference/runner protocol) plus organize_prompt, which an agent may hesitate between when it just wants 'how do I format this'.
Every tool uses the same prompthub_ prefix followed by a snake_case verb_noun or verb_object phrase (get_repo, create_repo, delete_artifact, upload_reference, describe_file_format). The handful of deviations (whoami, recommend) are still snake_case and idiomatic rather than a different convention.
19 tools for a prompt-repo platform is on the heavy side; four separate describe_* documentation tools plus organize_prompt could plausibly be folded into fewer calls or into the other tools' descriptions. Each remaining tool does earn its place, so it is not bloated, just borderline.
Repo lifecycle is fully covered (list/get/create/update/delete), artifacts have publish/upload/delete and are enumerable via get_repo, and references have upload/delete plus a schema explainer. The notable gap is granular file editing — update_repo is a destructive full replace with no per-file add/remove/rename operation, and artifacts have no true update (delete+republish workaround).
Maintenance
Related MCP Connectors
Your prompt library in any MCP client: list, fetch, save and version prompt templates.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server that exposes any LynxPrompt instance to LLMs, enabling browsing, searching, and managing AI configuration blueprints and prompt hierarchies.10142 npm2GPL 3.0
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides access to resources and prompts from GitHub repositories or the local filesystem, enabling teams to share coding standards, documentation, and reusable prompts with AI tools like Claude.1ISC
- AlicenseNot gradedqualityDmaintenanceMCP server for Langfuse Prompt Management that enables listing and retrieving Langfuse prompts via MCP prompts and tools.MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server for Codex to send prompts to ChatGPT Web Pro extension and manage repository tasks safely.1-