content-knowledge-mcp

content-knowledge-mcp

Provides content agents with structured search over editorial guidelines, visual templates, and past post outcomes, enabling auditable proposals that cite rule IDs.

Category
访问服务器

README

content-knowledge-mcp

An MCP server that gives a content agent access to a company's editorial knowledge: brand rules, a visual template catalog, and past posts with their outcomes. The knowledge lives in plain markdown files the company owns; the server only exposes it.

Built as the technical core of my BA thesis on AI agents and workflow automation. The version here is the generic engine, with an invented company as example knowledge.

Why there is no vector database

The obvious move is to embed the knowledge and retrieve by similarity. This server deliberately does not, for two reasons.

At this scale, structured search over curated files wins. A company's editorial rules are tens of blocks, not tens of thousands. Splitting them into chunks and retrieving by cosine similarity adds an indexing step, a store to keep in sync and a class of failure that is hard to see, in exchange for recall you already had.

Every rule carries an ID, and that is the point. Rules are R1, R17, R905; templates are T901, T905; launch records are L2. The agent is instructed to cite the IDs it used. That turns each proposal into something a human can audit in seconds: the reviewer reads rules_used: ["R920", "R903"] and knows exactly which rules produced that post. An embedding returns a paragraph; it does not return an argument. When the goal is a human gate that works, being auditable beats being clever.

The cost is real and worth stating: search is lexical, so a query that shares no words with a rule will not find it. The server says NO_MATCH instead of pretending, which is the behaviour the evaluation cases check.

Architecture

  Claude Desktop / Claude Code ──stdio──┐
                                        ├──▶ content-knowledge-mcp ──▶ KNOWLEDGE_PATH/
  n8n MCP Client Tool ──────────HTTP────┘         (3 tools)              guidelines/*.md   R# rules, L# launch records
       (host.docker.internal:8765)                                       templates/catalog.md   T# catalog
                                                                         past-posts/*.md        past posts and outcomes

Three tools, one transport switch, no state:

Tool Returns
search_guidelines(query) matching rule blocks with their R# and L# IDs
list_visual_templates(query) the template catalog, filtered, with T# IDs and usage rules
get_post_examples(query) up to three past posts with their outcomes, for tone calibration

The server owns no content. Point KNOWLEDGE_PATH at a different folder and it serves a different company: that is what made it publishable without touching the code.

Quickstart

git clone https://github.com/alessandro-martelli/content-knowledge-mcp
cd content-knowledge-mcp
python3 -m venv .venv && .venv/bin/pip install fastmcp

# run the twelve checks against the example knowledge
KNOWLEDGE_PATH=examples/knowledge .venv/bin/python smoke_test.py

# stdio, for Claude Desktop or Claude Code
KNOWLEDGE_PATH=examples/knowledge .venv/bin/python server.py

# HTTP on :8765, for the n8n MCP Client Tool
KNOWLEDGE_PATH=examples/knowledge .venv/bin/python server.py --http

The example knowledge under examples/knowledge/ is entirely invented: a fictional design school, with rules, launch records, a template catalog and three past posts. It exists so the repo runs for anyone, and so the tests have something to bite on.

Evaluation

Smoke tests: 12/12. Each check goes through a real fastmcp.Client over the protocol, not through the helper functions, so a break in tool registration or transport shows up here.

Agent-level protocol: 8 cases, 5 of them adversarial (conflicting rules, out-of-scope request, tool unavailable, no matching template, underspecified input). Executed August 2026 against the two agents' prompts: 6 of 8 passed, every output was valid JSON on the first try, and the two failures were defects in the test suite rather than in the agent. Both are written up in eval/test-log.md with the fix each one needs. The log is kept as it came out: a suite that only ever reports success is not measuring anything.

Honest limits

  • Search is lexical and scores by term frequency. It does not understand synonyms; a rule phrased in words the query does not use will not be found.
  • The knowledge folder layout is fixed (guidelines/, templates/catalog.md, past-posts/), and the catalog filename is hardcoded.
  • There is no write path and no cache: every call reads the files. That is fine at this size and would not be at ten thousand blocks.
  • The two open defects from the evaluation are not fixed in this code yet: rules_used cannot cite L# records, and the plan schema cannot express a row whose channel is unknown.

Licence

MIT, see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选