GPTkms

GPTkms

Local-first Knowledge Management System that exposes markdown-based durable memory as MCP tools for Codex and ChatGPT, enabling search, read, write, and promotion workflows with project and global scopes.

Category
访问服务器

README

GPTkms

GPTkms is a local-first Knowledge Management System for Codex and ChatGPT Work.

It follows a simple idea:

  • keep durable knowledge in plain markdown
  • expose that knowledge through an MCP server
  • separate project memory from global memory
  • use skills to teach retrieval and promotion workflows

The project is inspired by the LLM Wiki direction from Andrej Karpathy and the implementation ideas documented in thClaws.

Why this exists

Most AI workflows forget too much and over-rely on raw conversation history.

GPTkms tries to solve that by treating long-term memory as a maintained knowledge base instead of a pile of transcripts. The goal is to make memory:

  • inspectable
  • editable
  • portable
  • cross-project
  • compatible with Codex workflows

Positioning

GPTkms sits between simple persistent-memory tools and full personal knowledge systems.

In practical terms:

  • it is more structured and curated than a flat memory layer
  • it is more operational and agent-facing than a second-brain app like Obsidian
  • it is built from Codex-native primitives such as MCP and skills, rather than replacing them

For the longer comparison, see docs/POSITIONING_AND_LANDSCAPE.md.

Current status

This repository is an early working prototype.

Already implemented:

  • file-backed markdown KMS layout
  • MCP stdio server
  • global and project scopes
  • search, read, write, ingest, promotion, lint, and conflict tools
  • two Codex workflow skills
  • Playwright-based browser automation scaffold
  • browser-facing KMS demo page
  • sample KMS content for testing

Still in progress:

  • plugin packaging
  • merge/update flow for existing global pages
  • stronger conflict detection
  • broader multi-project examples

Core ideas

1. Markdown is the durable memory layer

Compiled knowledge lives in pages/.

Raw evidence lives in raw/.

This keeps memory readable by both humans and agents.

2. MCP is the runtime integration point

The MCP server gives Codex and ChatGPT a structured way to search, read, update, and promote memory.

3. Memory has scope

  • global/ is for reusable cross-project knowledge
  • projects/<project-id>/ is for repo-specific knowledge

4. Promotion should be curated

Project knowledge should not automatically become global knowledge.

Repository layout

.
├── .codex/
│   ├── kms.json
│   └── skills/
├── .github/
│   └── workflows/
├── docs/
├── sample_kms/
├── scripts/
└── src/

Included components

Implemented MCP tools

  • kms_list_bases
  • kms_get_active_context
  • kms_search
  • kms_read_page
  • kms_create_page
  • kms_update_page
  • kms_append_log
  • kms_ingest_source
  • kms_promote_candidate
  • kms_build_context_pack
  • kms_lint_links
  • kms_find_conflicts

Quick start

Use the bundled Codex Python runtime:

& 'C:\Users\sc282\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' `
  'E:\My Projects\GPTkms\scripts\smoke_test.py'

Then run the MCP server:

& 'C:\Users\sc282\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' `
  'E:\My Projects\GPTkms\scripts\run_server.py'

For a fuller setup guide, see docs/INSTALLATION.md.

Browser automation

This repo now includes a small Playwright scaffold for browser automation.

Quick commands:

npm install
npm run browser:install
npm run browser:smoke
npm run browser:demo

If node is not on PATH in Codex, use:

powershell -ExecutionPolicy Bypass -File .\scripts\run_browser_smoke.ps1

For details, see docs/BROWSER_AUTOMATION.md.

Demo

The repository includes a small browser-facing demo at demo/index.html.

It shows:

  • KMS-style entries with scope and citations
  • client-side search over project and global memory
  • a simple UI flow that Playwright can validate

Example Codex MCP config

[mcp_servers.gptkms]
command = "python"
args = ["E:\\My Projects\\GPTkms\\scripts\\run_server.py"]

[mcp_servers.gptkms.env]
GPTKMS_ROOT = "E:\\My Projects\\GPTkms\\sample_kms"
GPTKMS_PROJECT_DIR = "E:\\My Projects\\GPTkms"

Validation

Useful local checks:

python -m py_compile src/gptkms_mcp/server.py src/gptkms_mcp/kms_store.py scripts/smoke_test.py
python scripts/smoke_test.py
python scripts/validate_repo.py
npm run browser:smoke
npm run browser:demo

Saving session knowledge

To preserve the current work into project memory:

  1. save a raw session summary
  2. update durable project pages
  3. promote only reusable knowledge into global memory

You can use scripts/save_session_to_kms.py to create the raw session source quickly.

In Codex environments without node on PATH, replace the last command with:

powershell -ExecutionPolicy Bypass -File .\scripts\run_browser_smoke.ps1

Roadmap

Short version:

  • improve merge/update workflows for global pages
  • package the MCP server and skills as a reusable plugin
  • test against more than one real project
  • stabilize the public tool contract

For the fuller release plan, see docs/RELEASE_ROADMAP.md.

Contributing

See CONTRIBUTING.md.

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选