Skip to main content
Glama
Semiotronika

NOUZ MCP Server

by Semiotronika

NOUZ — 用于您的知识库的语义 MCP 服务器

适用于 Obsidian、Logseq 以及任何 Markdown 文件目录。

结构源于内容。

为知识库、项目记忆和 AI 代理提供的语义工具。

MIT License Python 3.10+ MCP PyPI

🇬🇧 英文版本


为什么需要 Nouz

文件夹展示了文件的存放位置,但它们无法向代理说明文档、想法和资料在库中是如何关联的。

NOUZ 为代理提供了语义坐标。每条笔记都会获得一个领域标记、层级级别以及与其他笔记的关联。领域标记直接根据文件内容分配,或者如果您需要严格的层级结构,也可以手动分配。


Related MCP server: Semantic Mesh Memory (SEM) MCP Server

功能特性

NOUZ 是您的笔记库与 AI 代理之间的中间层。它有助于将零散的 Markdown 文件转化为可以通过 MCP 处理的图结构:

  1. 自动分类(语义) 您设定“核心”——即您知识库的基础领域(例如:Systems Analysis, Data & Science, Engineering)。当您添加新笔记时,NOUZ 会读取其文本,比较向量,并建议领域标记或领域组合。

  2. 笔记间关联搜索 服务器构建有向图 (DAG) 并建议关联,您可以在写入前进行检查:

    • 语义桥梁: 来自不同领域的两篇笔记指向同一个想法。

    • 标签桥梁: 笔记在标签层面拥有共同的隐藏概念。

  3. 知识库演变追踪(漂移) NOUZ 自下而上聚合数据。如果某个模块最初属于一个领域,而新笔记逐渐将其引向另一个领域,服务器将显示偏差 (core_drift)。

根据您的任务,NOUZ 可在三种模式下运行:从简单的图 (LUCA) 到严格的 5 级层级 (SLOI)。


工作原理

  1. 您在 config.yaml 中描述领域——每个领域覆盖的范围以及通过哪些文本特征来识别它。

  2. 服务器将描述转化为基准向量(本地通过 LM Studio 或 Ollama)。

  3. 每条新笔记都会投影到这些轴上。标记由内容决定,或由您决定。

  4. L4 从文本分类中获取领域配置,而 L3/L2 从子节点收集 core_mix。如果模块的 signcore_mix 不符,服务器会报告 core_drift

两种类型的桥梁用于寻找不同领域笔记间的关联:语义(文本相似)和标签(概念重叠)。


快速开始

pip install nouz-mcp
OBSIDIAN_ROOT=/path/to/vault nouz-mcp

如果没有 config.yaml,服务器将以 LUCA 模式启动——即无语义的图,可立即使用。

要启用语义模式,请从模板创建本地配置:

cp config.template.yaml config.yaml

在 Windows PowerShell 中:

Copy-Item config.template.yaml config.yaml

或者从源码安装:

git clone https://github.com/Semiotronika/NOUZ-MCP
cd NOUZ-MCP
pip install -r requirements.txt
cp config.template.yaml config.yaml
OBSIDIAN_ROOT=./vault python server.py

连接到 Claude Desktop、Cursor、Opencode 或任何 MCP 客户端:

{
  "mcpServers": {
    "nouz": {
      "command": "nouz-mcp",
      "env": {
        "OBSIDIAN_ROOT": "/path/to/vault",
        "NOUZ_CONFIG": "/absolute/path/to/config.yaml",
        "EMBED_API_URL": "http://127.0.0.1:1234/v1"
      }
    }
  }
}

MCP 工具

工具

用途

suggest_metadata

标记、层级、桥梁、漂移警告

write_file

写入带有 YAML 标记的笔记

update_metadata

仅更新 YAML,不更改笔记文本

read_file

读取笔记 + 元数据

calibrate_cores

更新核心基准向量

recalc_signs

重新计算所有笔记的标记

recalc_core_mix

重新计算自下而上的聚合

index_all

重新索引整个库

embed

获取文本向量

list_files

按层级、标记过滤的列表

get_children

向下遍历图

get_parents

向上遍历图

suggest_parents

为孤立笔记寻找父节点

add_entity

一步创建实体(自动 sign、tags、parents)

process_orphans

自动填充无标记文件


配置

最小化 config.yaml

mode: prizma

etalons:
  - sign: S
    name: Systems Analysis
    text: >
      Methodology for analysing complex objects: feedback loops,
      emergent properties, self-regulation, bifurcation points.
      Cybernetics, synergetics, dissipative structures, catastrophe
      theory, autopoiesis — tools for understanding how the whole
      exceeds the sum of its parts. Not data and not code — a way
      of thinking about how parts form a whole and why systems
      behave non-linearly.
  - sign: D
    name: Data & Science
    text: >
      Physics and cosmology: from subatomic particles to the large-scale
      structure of the Universe. Lagrangians, curvature tensors, scattering
      cross-sections, quarks, bosons, fermions, plasma, vacuum fluctuations,
      cosmic microwave background, cosmological constant, decoherence.
      Pure science about the nature of matter, energy and spacetime.
  - sign: E
    name: Engineering
    text: >
      Software engineering, machine learning and infrastructure: writing
      and debugging code, deployment, containerisation, neural networks,
      inference, tokenisation, data serialisation, microservices, CI/CD,
      automated testing, refactoring, Git, Docker, Kubernetes, APIs.
      The practical discipline of building computational systems from
      architecture to production.

thresholds:
  sign_spread: 0.05
  confident_spread: 60.0
  pattern_second_sign_threshold: 30.0
  semantic_bridge_threshold: 0.55
  parent_link_threshold: 0.55

artifact_signs:
  - sign: n
    name: Note
    text: Short note, observation, fragment.
  - sign: c
    name: Concept
    text: Definition, concept, entity description.
  - sign: r
    name: Reference
    text: External source, documentation, link, citation.
  - sign: l
    name: Log
    text: Session log, chronology, dialogue record.
  - sign: u
    name: Update
    text: Update, release note, changelog entry.
  - sign: h
    name: Hypothesis
    text: Hypothesis, assumption, speculative idea.
  - sign: s
    name: Specification
    text: Technical specification, instruction, requirements.

配置完成后运行 calibrate_cores — 服务器将创建基准向量。 检查成对余弦相似度:不同领域之间的均值中心化(mean-centered)值应明显低于原始值。如果所有对都大致相同,请加强文本间的差异。

etalons 是通过嵌入进行比较的语义领域。 artifact_signs 是 L5 工件的材料类型:笔记、概念、链接、日志、更新、假设或规范。这是一种启发式标签,而不是嵌入的独立基准。在公共方案中,领域通常用大写字母 (S/D/E) 表示,材料类型用小写字母 (n/c/r/l/u/h/s) 表示;如果标记较短且不与领域冲突,可以在配置中替换它们。如有必要,可以为任何类型添加 keywords:这样服务器将使用您的词汇进行启发式分析,而不是内置的 RU/EN 集合。

实际计算示例

以下是使用 text-embedding-granite-embedding-278m-multilingual 模型对 S/D/E 基准的实际结果:

=== Pairwise Cosine (raw) ===
S↔D: 0.5894    S↔E: 0.5862    D↔E: 0.6022

=== Pairwise Cosine (mean-centered) ===
S↔D: -0.5059   S↔E: -0.5117   D↔E: -0.4822

这里的负均值中心化值是一个好结果:在减去平均向量后,领域区分度良好。自分类:S→99.4%, D→97.5%, E→96.9%。

变量

默认值

描述

OBSIDIAN_ROOT

./obsidian

知识库路径

NOUZ_CONFIG

(空)

config.yaml 的绝对路径;若未设置,服务器在当前目录查找配置

NOUZ_DATABASE_NAME

obsidian_kb.db

OBSIDIAN_ROOT 内的 SQLite 缓存文件名;便于隔离测试,例如 obsidian_kb.public.db

NOUZ_DATABASE_PATH

(空)

SQLite 缓存的完整路径;优先级高于 NOUZ_DATABASE_NAME

EMBED_PROVIDER

openai

openai, lmstudio, ollama

EMBED_API_URL

http://127.0.0.1:1234/v1

嵌入接口端点

EMBED_API_KEY

(空)

API 密钥(如需)

EMBED_MODEL

(空)

模型名称


隐私

组件

本地运行?

嵌入 (LM Studio / Ollama)

✅ 是

您的笔记

✅ 是

NOUZ 服务器

✅ 是

AI 代理上下文 (Claude, ChatGPT)

❌ 发送到云端

所有关键数据都保留在您的机器上。


开发

git clone https://github.com/Semiotronika/NOUZ-MCP
cd NOUZ-MCP
pip install -e .
python test_server.py

链接

MIT License © 2026 Semiotronika

余弦在计算。语法在变化。语义永存。

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
4dResponse time
2dRelease cycle
25Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

  • MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

  • Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.

  • MCP server for URL shortening and management

View all MCP Connectors

Latest Blog Posts

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/Semiotronika/NOUZ-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server