mdshare-mcp
mdshare-mcp
MCP 服务器允许 AI 聊天(Claude 及其他支持 MCP 的客户端)直接调用一个工具 publish_markdown,将 Markdown 内容发布到之前已部署的 mdshare 服务 — 无需将文件下载到本地后自行 curl 上传。
架构
Claude.ai (chat) → tool "publish_markdown" → mdshare-mcp (server này) → POST → mdshare → trả URL这是一个 Remote(Streamable HTTP) 类型的 MCP 服务器,独立运行在 Render 上 — 与只能安装在个人电脑上的 “local (stdio)” MCP 服务器不同。因为你是通过网页使用 Claude,Remote HTTP 版本是正确选择:无需在机器上安装任何东西。
Related MCP server: @nlspec/server
提供的 2 个工具
publish_markdown(content)— 将 Markdown 内容发布到mdshare,返回查看 URL 和原始 URL。fetch_markdown(key_or_url)— 基于 key 或 URL(接受domain/p/key和domain/p/key/raw两种形式)重新获取已发布 paste 的内容。这是一个重要的备用工具:一些 AI 聊天(已确认在 ChatGPT 上出现)无法自行获取返回Content-Type: text/plain纯文本的 URL — 这些客户端内置的浏览器工具通常被设计为读取 HTML 页面(包含<title>、DOM 结构等),而会将纯文本文件视为“下载文件”从而拒绝显示内容。遇到这种情况时,只需让 AI 聊天调用fetch_markdown而不是自行打开 URL — 内容将在服务器内部直接获取,并直接返回到工具结果中,不依赖客户端的网页浏览能力。
哪些平台支持自定义 MCP server?(写于当前时间,可能变化)
平台 | 支持自定义 remote MCP? | 备注 |
Claude | 是 | 所有套餐,包括免费版 |
ChatGPT | 是 | 需要开启开发者模式,付费套餐(Plus/Pro/Business/Enterprise/Edu) |
Grok | 是 | 付费套餐,位于 grok.com/connections 的 “Bring Your Own MCP” 选项 |
Qwen、DeepSeek、Kimi、z.ai (GLM)、Manus、Meta AI | 未知 / 可能在消费级聊天 UI 中尚不支持 | 一些方以其他方式支持 MCP(作为 MCP 服务器供其他客户端调用,或通过编程 SDK),但尚未确认在普通网页聊天界面中有“添加自定义 MCP server”的选项 |
由于该服务器严格遵循 MCP 标准(Streamable HTTP),它都可以自动运行在任何支持该标准的客户端中 — 无需针对每个平台修改代码。对于上面“未知”的几行,最可靠的方法是在该平台的 Settings/Connectors 部分直接检查,因为不同 AI 聊天之间的 MCP 支持信息正在快速变化。
步骤 1 — 部署到 Render
与部署 mdshare 时采用的流程完全相同:
将代码(
server.js、package.json、render.yaml)推送一个新的 GitHub 仓库,例如mdshare-mcp。在 Render:New → Blueprint → 选择
mdshare-mcp仓库。当提示输入环境变量时,输入:
MDSHARE_BASE_URL= 之前已部署的mdshare服务的 URL(例如https://mdshare-11s5.onrender.com— 不要带末尾/)。
点击 Apply。
部署完成后,Render 会提供一个类似 https://mdshare-mcp-xxxx.onrender.com 的 URL。真正的 MCP 端点位于:https://mdshare-mcp-xxxx.onrender.com/mcp。
步骤 2 — 通过 Custom Connector 连接到 Claude.ai
访问 claude.ai → Settings → Connectors(或者 Settings 中的相应选项)。
选择 Add custom connector(或 “Add more”)。
输入 URL:
https://mdshare-mcp-xxxx.onrender.com/mcp设置一个容易记住的名称,例如 “mdshare”。
保存。Claude 会自动发现
publish_markdown工具。
完成此步骤后,在任何对话中,你可以(通过聊天框中的工具菜单)开启 “mdshare” 连接器,然后请求,例如:
“将以上内容总结为 markdown,并发布到 mdshare 给我”
Claude 会自动调用 publish_markdown 工具,并在聊天中直接返回结果 URL。
从其他 AI 聊天(ChatGPT 等)连接
例如,如果该客户端支持通过 Streamable HTTP 使用 MCP(标准 MCP 协议,非 Anthropic 专有),流程类似:将该客户端的连接器/工具配置部分填入 URL https://mdshare-mcp-xxxx.onrender.com/mcp。添加连接器的语法因平台各异 — 查看该客户端的官方文档,了解配置位置。
手动测试(不经 AI 聊天,仅为确认服务器工作)
在 Windows 的 cmd 中:
curl -X POST https://mdshare-mcp-xxxx.onrender.com/mcp ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}"结果中应包含 publish_markdown 工具。
安全注意事项
此 MCP 服务器没有认证 — 任何知道
/mcpURL 的人都能调用publish_markdown工具向你的mdshare发布内容。对于个人使用,风险较低(URL 不公开,且通过 Render 的随机子域名难以猜测),但如果你要更安全:在处理 MCP 请求之前,在
server.js中添加一个秘密 header(例如X-Api-Key)检查。配置环境变量
MCP_SHARED_SECRET,并要求客户端携带该 header。
mdshare(目标服务)本身并不需要认证,因此以上(原设计如此)— 此工具只是简单地将你以前使用curl手动行为自动化,不会在mdshare端引入新的风险。
设计选择背后的理由
Streamable HTTP 而非 SSE(Server-Sent Events):SSE 是较旧一代的 MCP 协议,当前的 MCP 规范已不推荐使用;Streamable HTTP 是当前的专有协议,官方 SDK 推荐用于远程 MCP 服务器。
无状态(
sessionIdGenerator: undefined):因为工具只执行一个简单操作(发送一次 POST,接收一个结果),不需要在多次调用之间维护会话状态 — 这使服务器更简单,并且能很好地适用于容器可能在任意时间重启的 serverless/free-tier 环境。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConverts documents (PDF, DOCX, images, etc.) to Markdown using Microsoft's Markitdown library, with no local setup required. Integrates with AI agents via MCP for seamless document conversion.1
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to parse, create, update, delete, and search natural language specification elements in markdown files via MCP tools.1MIT
- FlicenseAqualityCmaintenanceConverts files (PDF, DOCX, PPTX, XLSX, images via OCR) and URLs to Markdown, enabling AI clients to read them via a single MCP tool.1
- AlicenseNot gradedqualityBmaintenanceProvides portable memory for AI agents using plain Markdown files. Enables storing, recalling, and managing memories via MCP tools like recall, remember, forget, list, and get.181MIT
Related MCP Connectors
Publish AI-generated HTML & Markdown to a hosted, shareable URL via MCP.
MCP-native collaborative markdown editor with real-time AI document editing
Publish Markdown or HTML to a shareable link from your AI assistant. OAuth, no API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hoangpm/mdshare-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server