﻿---
title: "Nowledge Mem Codex 插件"
filename: "terminal"
canonical: /templates/nowledge-mem-codex-plugin/
---

# Nowledge Mem Codex 插件

先准备 Mem 和 nmem CLI，再使用两个 --sparse 参数添加插件源。安装后运行 install_hooks.py，连接本地 Mem 服务。

```
pip install nmem-cli
nmem doctor

codex plugin marketplace add nowledge-co/community --sparse .agents --sparse nowledge-mem-codex-plugin
codex plugin add nowledge-mem@nowledge-community

HOOK_SETUP="$(find ~/.codex/plugins/cache -path '*/nowledge-mem/*/scripts/install_hooks.py' -print 2>/dev/null | sort | tail -1)"
python3 "$HOOK_SETUP"

# 捆绑 MCP：http://127.0.0.1:14242/mcp/
# 不要：codex mcp login nowledge-mem
# 远程才覆盖 [mcp_servers.nowledge-mem]

```
