Skip to main content
Glama

content-knowledge-mcp

コンテンツエージェントに企業の編集知識(ブランドルール、ビジュアルテンプレートカタログ、過去の投稿とその成果)へのアクセスを提供するMCPサーバー。知識は企業が所有するプレーンなMarkdownファイルの中にあり、サーバーはそれを公開するだけです。

AIエージェントとワークフロー自動化に関する私の学士論文の技術的中核として構築しました。ここにあるのは汎用エンジンで、サンプル知識として架空の企業を使っています。

なぜベクターデータベースを使わないのか

当然の選択は、知識を埋め込んで類似度で検索することです。このサーバーは意図的にそれをしていません。理由は2つあります。

この規模では、厳選されたファイルに対する構造化検索が勝ります。 企業の編集ルールは数万ブロックではなく、数十ブロックのものです。それらをチャンクに分割してコサイン類似度で検索すると、インデックス化の工程、同期を保つストア、そして見えにくい失敗の種類が追加されます。その代わりに得られるのは、すでに手に入れていた再現率だけです。

すべてのルールにはIDがあり、そこが肝です。 ルールは R1、R17、R905、テンプレートは T901、T905、ローンチ記録は L2 です。エージェントには、利用したIDを引用するよう指示されています。それによって各提案は、人間が数秒で監査できる対象になります。レビュアーは rules_used: ["R920", "R903"] を読み、その投稿を生んだルールを正確に把握できます。埋め込みは段落を返しますが、論拠は返しません。機能する人間のゲートが目的なら、賢く振る舞うことより監査可能であることが勝ります。

そのコストは現実のものであり、明示しておく価値があります。検索は語彙ベースなので、ルールと単語を一切共有しないクエリは、そのルールを見つけられません。サーバーは無かったことにする代わりに NO_MATCH を返します。これを評価ケースは検証しています。

Related MCP server: OntoRamp Graph Query

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

ツールは3つ、トランスポート切り替えは1つ、グローバル状態は持たない:

ツール

返り値

search_guidelines(query)

述べるルールブロックと、その R# と L# の ID

list_visual_templates(query)

テンプレートカタログをフィルタリングして、T# ID と使用条件を返す

get_post_examples(query)

トーン調整用に、成果を含む過去投稿を最大3件返す

クイックスタート

G2

This is still the same content; let me write the remainder correctly.

クイックスタート

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

examples/knowledge/ の例の知識はすべて架空のものです。架空のデザイン学校という設定で、ルール、公開記録、テンプレートカタログ、過去の投稿3件が含まれています。このため、リポジトリは誰でも実行できる状態で、テストには実際に触る材料が豊富にあります。

評価

スモークテスト: 12/12。 各チェックは、ヘルパー関数ではなく、プロトコル上の実 fastmcp.Client を通過します。そのため、ツール登録やトランスポートの破壊はここで判明します。

エージェントレベルのプロトコル: 8ケースのうち5ケースが敵対テスト(矛盾するルール、範囲外の要求、利用できないツール、テンプレート不一致、入力不足)。2026年8月に、エージェントの2つのプロンプトに対して実施。8件中6件が合格で、初回から全出力が妥当な JSON であり、2件の失敗はエージェントではなく検証スイート側の欠陥でした。2件それぞれに必要な修正は、eval/test-log.md に書かれています。ログはそのままの状態で残してあります。成功だけを報告するスイートは、何も測定していません。

正直な限界

  • 検索は語彙ベースで、出現頻度でスコアします。類義語は通じないため、クエリに使われていない単語で定型されたルールは見つけることができません。

  • ナレッジのフォルダ構成は固定(guidelines/、templates/catalog.md、past-posts/) で、カタログのファイル名もハードコードされている。

  • 書き込みパスもキャッシュもない。呼び出すたびにファイルを読む仕組みです。この規模では問題ないが、1万ブロックに増えると破綻する。

  • 評価から出た未修正の欠陥が2件、このコードにはただいている:rules_used が L# レコードを引用できないこと、およびプランスキーマがチャンネル未確定行を表現できないこと。

ライセンス

MIT、LICENSE を参照。

Available Tools

3 tools
get_post_examplesA

Retrieve past posts with their outcomes, for tone calibration. Query by topic, channel or type, e.g. 'linkedin annuncio'. Returns up to 3 examples; never copy sentences from them.

NameRequiredDescriptionDefault
queryNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the full behavioral disclosure burden. It reveals the return limit ('Returns up to 3 examples') and adds a usage constraint ('never copy sentences from them'). The verb 'Retrieve' sufficiently implies a read-only operation for this kind of tool. It could optionally disclose more about the output shape, but that is already structurally represented by an output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences contain the entire message with no filler. The tool's value is front-loaded, followed by a practical example, a return limit, and a usage constraint. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter retrieval tool with an output schema available, the description covers what is returned, how to query, and a practical guardrail. The only omission is a note about the default parameter, but the schema already declares a default. The agent can select and invoke the tool with confidence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage on the only parameter, `query`, so the description must compensate. It does: the parameter can be used to search by topic, channel, or type, and an example value is given. It does not describe what empty input does, though schema's default value covers that reasonable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and resource: 'Retrieve past posts with their outcomes'. It also adds the intended use, 'tone calibration', which makes the tool's function concrete. It is clearly distinguishable from siblings like search_guidelines and list_visual_templates because neither of those fetches example posts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description tells the agent that querying can be by topic, channel, or type, with a concrete example ('linkedin annuncio'). It does not explicitly contrast with search_guidelines or list_visual_templates, but the purpose of tone calibration and the example query provide enough context. A score of 5 would require explicit when-to-use versus the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_visual_templatesA

List the official visual template catalog with usage rules (T# IDs). Optional query filters by content type, e.g. 'annuncio corso'. Empty query returns the full catalog.

NameRequiredDescriptionDefault
queryNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations providing read-only or side-effect hints, the description carries the behavioral burden. It communicates that the tool lists an official catalog, returns usage rules with T# IDs, and behaves differently based on the query parameter. It does not go further to describe matching behavior, ordering, or whether any 'rules' are embedded in the returned data, but the core read-oriented behavior is reasonably clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loads the main purpose, and uses an example to clarify parameter usage. There is no filler or repetition of schema fields, and every phrase adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list-with-optional-filter tool, the description covers the tool's purpose, the optional query, and the empty-query behavior. The presence of an output schema compensates for not describing the return structure. Minor ambiguity remains about what 'content type' means and how T# IDs are used, but as a whole it is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does. The 'query' parameter is given semantics: it optionally filters by content type, with the example 'annuncio corso', and empty returns the full catalog. This is meaningful beyond the raw string schema. It could be slightly stronger, but it sufficiently explains the one parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action, 'List the official visual template catalog', with a resource and an explicit mention of what makes these templates usable: the T# IDs. It does not explicitly contrast itself with the sibling tools search_guidelines or get_post_examples, so it stops short of full differentiation, but the verb and resource are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains when the query parameter is useful and that an empty query returns the full catalog, which provides practical guidance for using the tool. However, it does not explicitly state when to prefer this tool over sibling tools such as search_guidelines or get_post_examples, so the usage context remains partially implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_guidelinesB

Search the company brand and editorial rules. Returns matching rule blocks with their IDs (R#), e.g. 'tone course post linkedin'.

NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of indicating behavior safely. It does disclose that the tool returns 'matching rule blocks with their IDs (R#)', which explains the shape of the output. However it omits details such as whether it is read-only, how many results are returned, or any limitations on query syntax.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences only: the first states purpose, the second gives return format and a clear example. Every sentence serves a direct purpose with no fluff. It is appropriately front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter search tool with an output schema already defined, the description is nearly complete. It explains the input style and output format for typical searches. It still lacks usage guidance relative to siblings, which slightly reduces completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Parameter schema coverage is 0% since the query string has no description. The description compensates by giving a concrete example ('tone course post linkedin'), which clarifies that the query is free-form text and likely case-insensitive phrase style. This is meaningful added meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('Search') and a precise resource ('company brand and editorial rules'). It distinguishes this as a search tool from the sibling tools (list_visual_templates, get_post_examples), though it could be more explicit about exactly how it differs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not say when to use this tool rather than the siblings. It gives no context, precedence, or exclusion. The example query implies usage, but an agent is given no guidance to choose this over the alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedget_post_examples
    • First observedlist_visual_templates
    • First observedsearch_guidelines

TDQS

A4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct knowledge resource: editorial rules, visual templates, and past post examples. The descriptions clearly distinguish search, list, and get operations despite all supporting query. An agent can reliably choose the correct tool for each content creation step.

Naming Consistency5/5

All tool names follow the consistent snake_case verb_noun pattern: search_guidelines, list_visual_templates, get_post_examples. The verbs also accurately reflect the operation type, making the naming predictable and scannable.

Tool Count5/5

With only three tools, the server is tightly focused on content knowledge retrieval. Each tool covers a core knowledge domain for content creation—rules, templates, and examples—without redundant or unnecessary additions.

Completeness4/5

The set covers the main content-making inputs: brand/editorial guidelines, visual template catalog, and performance-calibrated post examples. Minor gaps exist such as fetching a specific rule by ID or retrieving more than three examples, but the tool set supports its purpose effectively.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Enables AI agents to access and manage project guidelines, documentation, and context through a structured content system with template support and workflow management.
    37
    42 PyPI
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides read-only knowledge search and guarded action proposal tools. Write-like actions require human approval and return traceable evidence with policy events.
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables agents to search and reference trusted, out-of-band ingested source state, run claim-bound document reviews, validate evidence-status proposals against admissibility guards, and build evidence matrices. It keeps proposal, evidence, admissibility, and adjudication separate so agents can propose epistemic statuses without creating the source facts, page locators, provenance, or missingness records that support them.
    5
    MIT