Pathrule

MCP文档知识

提供方 未标注

文档知识 HTTP · 远程 会话登录 社区 / 第三方 ClaudeCursorVS CodeWindsurf
查看接入方式

面向编码代理的路径范围记忆、规则和技能,可本地使用或通过 Pathrule Cloud 同步。

一句话选型结论

按资料字段整理

Pathrule 属于文档知识类 MCP 服务器,HTTP · 远程,会话登录,可直接接入 Claude、Cursor、VS Code 等,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式HTTP · 远程 鉴权会话登录 部署方式支持远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

记忆

安装与配置

HTTP · 远程 会话登录
连远程 HTTPS 端点,通常为 Streamable HTTP
npx add-mcp 'https://cloud.pathrule.io/mcp'

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor、VS Code,换客户端不用重新研究配置。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Pathrule当前 未标注 HTTP · 远程 支持远程部署 有 2026-11-20
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式HTTP · 远程连远程 HTTPS 端点,通常为 Streamable HTTP
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型支持远程部署上游给出的部署形态
最近核验2026-11-20上游最后核验时间

详细介绍

10.0 KB
来自项目仓库与上游目录的原文,未做删改

English · Español · Français · Deutsch · 日本語 · Italiano · Türkçe · Português (Brasil)

Your AI forgets. Pathrule remembers.

The open-source knowledge layer for coding agents. Pathrule keeps what your project has learned as memories, rules and skills scoped to paths in your code, and gives Claude Code, Codex, Cursor, GitHub Copilot and Windsurf only what the task in front of them needs, before they act.

PathruleBench, 2,000 items: 55% lower cost a chain · 2.7× fewer input tokens · 97% of memory probes passed · the numbers

Website · Docs · Quickstart · Benchmarks · Smarter over time · Changelog

Same request, same agent. On the right, Pathrule's hook hands over the three notes filed for apps/web/dashboard before the agent writes a line.

Works with Claude Code · Codex · Cursor · GitHub Copilot · Windsurf · any MCP client

Quickstart

Node.js 22.14.0 or newer, on macOS, Linux or Windows.```bash
npm i -g @pathrule/cli
pathrule setup --local # no account: knowledge stays on this machine
pathrule doctor # see what each agent receives


Restart your agent. From the next session on, it gets the notes for the path it is about to touch, and writes new ones as it works.

| Other ways in | Command | Good for |
| --- | --- | --- |
| VS Code extension | `code --install-extension Pathrule.pathrule-vscode` | Knowledge beside the code. Marketplace and Open VSX. |
| Claude Code / Codex plugin | `/plugin marketplace add pathrule/pathrule` · `codex plugin marketplace add pathrule/pathrule` | Installing from inside the agent. Setup shows a plan before it changes anything. |
| Cursor plugin | Cursor Marketplace → Pathrule | The same hooks, MCP and skills inside Cursor. |
| Gemini CLI / OpenCode plugin | `gemini extensions install https://github.com/pathrule/gemini-cli-extension` · `opencode plugin @pathrule/opencode --global` | The same setup in Gemini CLI and OpenCode. |
| Any MCP client | `npx -y @pathrule/mcp` | Agents without a plugin system. Listed in the official MCP Registry. |
| Local Console | `pathrule ui` | Browse and edit knowledge on 127.0.0.1. No account. |
| Remote MCP | `claude mcp add --transport http pathrule https://cloud.pathrule.io/mcp` | Trying it with nothing installed. No hooks, no local mode. |
| From source | `pnpm install && pnpm cli:bundle` | Hacking on Pathrule. See docs/quickstart.md. |

## Explain it once

Coding agents start every session blank. So the same correction comes back, day after day, agent after agent:

| Day | Agent | What you typed |  |
| --- | --- | --- | --- |
| Mon | Claude Code | “use our api client, not fetch” | 1st |
| Tue | Claude Code | “again: api client, not fetch” | 2nd |
| Wed | Codex | “we use the api client.” | 3rd |
| Thu | Cursor | “I told you yesterday. api client.” | 4th |
| Fri | Claude Code | “API CLIENT. NOT FETCH.” | 5th |

Five sessions, three agents, nothing remembered. With Pathrule you say it once:

1. **You fix it once**, the way you normally would.
2. **Pathrule files it** next to the code it is about: a memory on `features/`, not a line in a file every session has to read.
3. **Every agent knows** from the next session on, whichever one you open.

## Only what matters

A workspace collects hundreds of notes. An agent editing `features/orders` needs four of them.

Knowledge is matched by path, scope and relevance, then fit to a per-prompt budget. Enforced rules are never cut for space. Whatever does not fit is listed by title, so the agent can ask for it. When a prompt names a function or a type, the hook also points the agent to the file and line where it is defined (JS/TS, Python, Go).

### Three kinds of knowledge

| Kind | What it holds | Example on `features/` |
| --- | --- | --- |
| **Memory** | Decisions, gotchas and incidents, in short markdown. | “Use the api client. It handles auth and retries.” |
| **Rule** | Constraints the agent must follow, ranked above advice. | “Data loading goes through React Query.” |
| **Skill** | Reusable procedures and checklists an agent can run. | “Run the checks before calling it done.” |

### Three ways in

| Channel | When it reaches the agent | Cost |
| --- | --- | --- |
| Path-scoped rule files | Claude Code reads Pathrule's own `.claude/rules/pathrule/` at session start, each file scoped to its paths. Your `CLAUDE.md` and `AGENTS.md` are left as they are. | Cached by the client. |
| Hooks | Before the agent acts: on session start, on each prompt and on file tools. Only new or changed context is sent again. | Budgeted per prompt. |
| MCP `get_context` | When the agent asks, at the depth the request needs. | Every MCP client has it. |

## Why not just CLAUDE.md?

**A CLAUDE.md file is read whole on every step, so every note your team adds makes every session cost more. Pathrule sends each prompt only what the path and the task need.** PathruleBench measured the difference with the same agent, the same prompts and the same hidden checks, from 500 to 2,000 items of team knowledge.

| At 2,000 items of team knowledge | CLAUDE.md | Pathrule |
| :-- | :-: | :-: |
| Cost a chain of 8 sessions | $3.89–$4.21 | **$1.76–$1.89** |
| Input tokens a chain | 11.8–12.5 M | **4.3–4.7 M** |
| Memory probes passed | 89% | **97%** |
| Chains that passed every memory probe | 0 of 9 | **5 of 9** |
| A habit said once, followed later | 78% | **97%** |
| What a failing command taught, kept | 33% | **78%** |
| The work each prompt asked for | 100% | **100%** |

From 500 to 2,000 items, a chain with CLAUDE.md costs 89–98% more. With Pathrule it moves between −1% and +10%. Your knowledge base can grow; the bill does not.

Claude Code with claude-sonnet-5-5 in Python, Go and TypeScript; nine chains an arm at 2,000 items (three per language); executable tests decide every pass, no model judges. The Pathrule arm is this repository's open-source CLI in local mode: no Cloud, no model.

**Every condition, chain and check, and how to run it yourself → pathrule/benchmark**

## Smarter the longer you use it.

Day one needs no account, no network and no model. Everything after builds on what you and your agents already did in this repository.

| **Day 0**
Foundation · Hooks and the local MCP server are wired into your agents. What you write is delivered per path, within a budget, through the hooks and Claude Code's path-scoped rules; your own `CLAUDE.md` and `AGENTS.md` are left as they are. · Open source, this machine
| **Week 1**
Memory · A decision you state in a prompt (“from now on…”, “we decided…”) is saved in your own words. A lesson a failing command taught is saved once. Each note is filed next to the code it is about, and only new or changed context is sent again. · Open source, this machine
| **Month 1**
Your habits · A preference you state lives in a local file of your own. Said once in passing, it waits; said again in another session, it reaches every agent. One you call lasting is in force at once. A project rule always wins over a personal one. · Open source, this machine
| **Month 3**
At scale · Thousands of notes, and a session stays the same size: the root rules file stays around 6k characters and the rest arrives per prompt. A sentence that says where code lives is marked `(as of writing)`, so when a teammate moves the file the agent follows the code. When an edit writes a value a newer decision replaced, the hook quotes the decision at that edit. · Open source, this machine
| **When you choose**
Team · The same knowledge on every machine and for every member. For a Cloud workspace, a model also reads the prompts Pathrule's phrase rules found nothing in and keeps the sentence you meant to last, still in your words. It is paid from AI Credits. · Pathrule Cloud, opt-in

No model runs on your machine. Everything before Team is the open-source CLI, the same path the benchmark above measured.

## Switch agents. Keep the knowledge.

| Agent | Before it acts | Instruction file | MCP |
| --- | --- | --- | --- |
| Claude Code | Hooks, prompt hook included | Pathrule's own `.claude/rules/pathrule/` | Local or Remote |
| Codex | Hooks, prompt hook included | — | Local or Remote |
| Cursor | — | — | Local |
| GitHub Copilot | — | — | Local |
| Windsurf | — | — | Local |
| Any MCP client | — | — | Local or Remote |

## Not another rules file

|  | A rules file | Pathrule |
| --- | --- | --- |
| Written | By hand, kept current by hand | Grows as you and your agents work |
| Reaches | One tool per file | Every connected agent |
| Delivered | All of it, every session | Only what the path and the task need |
| Changes | When someone edits it | Versioned; new knowledge replaces old |

Keep your `CLAUDE.md` and `AGENTS.md`: Pathrule does not edit them. It delivers the rest per path and per task, where a single file cannot.

## What's in this repository

This is Pathrule's open-source foundation. It runs with no account and no network service: the store, retrieval and ranking, the MCP server, the hooks, the learning loop and the CLI.

| Part | Here | Licence |
| --- | --- | --- |
| **Foundation**: protocol, agent IR, the local knowledge store, host, MCP server, CLI, Pathrule Cloud client, agent integrations, Local Console, VS Code extension | Yes | Apache-2.0 |
| **Pathrule Cloud**: team workspaces, sync, the web console, Remote MCP, the Cloud model tier | No | Proprietary |

The 11 packages

```bash
pnpm install
pnpm typecheck      # every package
pnpm test           # every package's tests
pnpm build          # each package's npm build

Your code stays yours

  • Source code is never uploaded automatically.
  • Local mode has no account, runs no model, and the open CLI sends no telemetry.
  • Your agent keeps its own model provider. Pathrule is not a model, an agent or an IDE.
  • Pathrule Cloud is opt-in. Signed in, it stores your knowledge and uses the prompt to rank it, and its model tier may read a prompt to find a decision meant to last.

Community

Contributors

License

Apache-2.0. See LICENSE and NOTICE. The Pathrule name and logo are not licensed under Apache-2.0.

pathrule.io · Docs · Pathrule Cloud

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Pathrule 怎么安装?

在客户端按下面的安装命令接入:npx add-mcp 'https://cloud.pathrule.io/mcp'。装完在客户端配置里引用同一个包或端点。

Pathrule 怎么在 Claude、Cursor、VS Code 里配置?

它的传输方式是HTTP · 远程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Pathrule 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Pathrule 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

Pathrule 支持哪些客户端?

资料标注支持 Claude、Cursor、VS Code、Windsurf、Cline、Gemini CLI;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Pathrule 能提供哪些能力?

资料显示能力标签包括 记忆。具体工具清单以官方文档为准。

Pathrule 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

Pathrule 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为HTTP · 远程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-11-20。