mcp-advanced-concepts

mcp-advanced-concepts is a cursor rule for Cursor from noveldig/mcp-xhs-publisher. It costs 1,201 tokens per session, scanned A, original, MIT.

A guide to advanced Model Context Protocol concepts, including reusable prompts, requests for text generation, resource roots, and communication transports. MCP is a standard for connecting AI assistants with tools and data.

In plain words
What is it for?
Design or review MCP servers that expose prompt templates, request text generation, organize resources, or support different connection methods.
Why use it?
It explains the parts needed when a basic tool connection is not enough and clarifies how servers and clients exchange prompts, resources, and generated text.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Design or review MCP servers that expose prompt templates, request text generation, organize resources, or support different connection methods.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/noveldig/mcp-xhs-publisher

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-advanced-concepts

README.md
[![agentmods](https://agentmods.dev/badge/rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts/github.svg)](https://agentmods.dev/rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts)
Your own site
<a href="https://agentmods.dev/rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts"><img src="https://agentmods.dev/badge/rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-advanced-concepts

Your own site · 80×15
<a href="https://agentmods.dev/rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts"><img src="https://agentmods.dev/badge/rules/noveldig/mcp-xhs-publisher/mcp-advanced-concepts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,201 This file is loaded in full into every session.
When invoked 1,201 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01201 $0.01201
Opus 5 $0.00600 $0.00600
Sonnet 5 $0.00240 $0.00240
Haiku 4.5 $0.00120 $0.00120

Measured 11d ago against content hash 784694265ba3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mcp-advanced-concepts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/mcp-advanced-concepts.mdc · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP 高级概念指南 (MCP Advanced Concepts Guide)

本指南涵盖了 MCP (Model Context Protocol) 中的一些高级概念,包括 Prompts(提示)、Sampling(采样)、Roots(根)和 Transports(传输)。理解这些概念有助于构建更复杂和功能更丰富的 MCP 服务器和客户端应用。

1. Prompts (提示)

参考:MCP Prompts Concepts

  • 定义: Prompts 在 MCP 中允许服务器向 LLM 提供可重用的提示模板和工作流。这有助于标准化与 LLM 的交互,并简化复杂任务的构建。
  • 用途: 服务器可以暴露预定义的 prompt 模板,客户端(或 LLM)可以选择并填充这些模板以生成具体的请求。
  • 组件:
    • 模板 (Template): 包含占位符的文本,LLM 可以填充这些占位符。
    • 参数 (Parameters): 定义模板中占位符的输入。
    • 元数据 (Metadata): 描述提示的用途、预期输出等。
  • 规则:
    • 当服务器提供需要复杂或结构化输入的 LLM 交互时,应考虑使用 Prompts。
    • Prompts 的设计应易于 LLM 理解和使用。
    • 服务器应通过 listPrompts (如果 MCP 规范支持) 或类似机制暴露可用的 Prompts。

2. Sampling (采样)

参考:MCP Sampling Concepts

  • 定义: Sampling 允许 MCP 服务器向 LLM 请求文本补全 (completions),并对生成过程施加一定的控制(例如,温度、最大 token 数等采样参数)。
  • 用途: 当服务器需要 LLM 生成文本(例如,根据上下文回答问题、总结信息或创作内容)时,可以使用 Sampling 功能。
  • 机制: 服务器可以向其连接的客户端(通常是 LLM 服务代理)发送补全请求,并指定采样参数。
  • 规则:
    • 服务器应仅在确实需要 LLM 生成能力时才请求采样。
    • 采样参数的选择应根据具体任务的需求进行调整。
    • 对于 coze-mcp-server,虽然其主要作为工具和资源的提供者,但在某些工具的实现中(如 chat_with_bot),可能间接涉及到代表用户向 Coze 后端(包含 LLM)发起类似"采样"的请求。

3. Roots (根)

参考:MCP Roots Concepts

  • 定义: Roots 是 MCP 中用于组织和发现资源的顶层入口点。它们帮助客户端了解服务器提供了哪些主要的资源类别或功能区域。
  • 用途: 客户端可以通过查询服务器的 Roots 来开始浏览可用的资源和服务。
  • 结构: Roots 通常是一个层级结构,允许逻辑上对资源进行分组。
  • 规则:
    • 服务器应定义有意义的 Roots,以便客户端能够有效地导航其提供的资源。例如,coze-mcp-server 可能有 botsworkspaces 等 Roots。
    • Roots 的设计应保持稳定,避免频繁更改导致客户端混淆。

4. Transports (传输)

参考:MCP Transports Concepts

  • 定义: Transports 规定了 MCP 客户端和服务器之间如何交换消息。它定义了通信的底层机制。
  • 标准: MCP 通常基于标准传输协议(如 WebSockets, STOMP over WebSockets, 或简单的 HTTP)进行通信,消息内容采用 JSON 格式。
  • Python SDK: 在使用 modelcontextprotocol/python-sdk 时,开发者通常不需要直接处理底层的 Transport 细节,因为 SDK 会封装这些复杂性。
  • 规则:
    • 服务器实现应确保其 Transport 层与 MCP 规范兼容。
    • 对于 coze-mcp-server,其通过 uvx coze-mcp-serverpython -m coze_mcp_server 启动,并监听传入的 MCP 连接,其 Transport 机制由其依赖的 MCP 库(可能是 Python SDK)处理。
    • 配置(如端口、协议)应清晰并在 [README.md](mdc:README.md) 中说明,coze-mcp-server 的 README 提供了在 Claude.app 和 Zed 中的配置示例,这些配置间接指定了如何连接到服务器的 Transport。

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 61 lines · 1,201 tokens per session scan A 784694265ba3

Subscribe to this mod's changes

mcp-advanced-concepts is a cursor rule published in the GitHub repository noveldig/mcp-xhs-publisher (1 stars, last pushed 1y ago), licensed MIT. It adds 1,201 tokens to every session, about $0.0060 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.