type
status
date
slug
summary
tags
category
icon
password
功能简介
LLM.txt MCP Server 用于从 llm.txt 文件中提取并提供上下文,使 AI 模型能够理解开发环境中的文件结构、依赖关系和代码关系。 该服务器提供对 LLM.txt 目录的全面访问,支持文件列表、内容检索和高级多查询搜索功能。
主要功能特性
- 支持目录列表,并进行本地缓存(缓存时间为 24 小时)。
- 不同操作系统有特定的缓存位置:
- Windows:
%LOCALAPPDATA%\llm-txt-mcp
- macOS:
~/Library/Caches/llm-txt-mcp
- Linux:
~/.cache/llm-txt-mcp
- 支持多查询搜索并提供上下文。
快速开始指引
- 推荐方式:使用 MCP Get 进行安装,命令为
npx @michaellatman/mcp-get@latest install @mcp-get-community/server-llm-txt
,它会自动在 Claude Desktop 中配置服务器。
- 手动配置:在 Claude Desktop 配置文件 claude_desktop_config.json 中添加以下内容:
- 开发模式:先执行
npm install
安装依赖,再执行npm run watch
以自动重新编译的方式运行。
Tool 列表
list_llm_txt
:列出目录中所有可用的 LLM.txt 文件,结果本地缓存 24 小时。
get_llm_txt
:根据 ID(通过 list_llm_txt 获取)获取 LLM.txt 文件的内容。参数为id
(LLM.txt 文件的数字 ID)。
search_llm_txt
:在 LLM.txt 文件中搜索多个子字符串。参数为id
(LLM.txt 文件的数字 ID)、queries
(要搜索的字符串数组,不区分大小写)、context_lines
(可选,匹配前后要显示的行数,默认值为 2)。
操作实践
https://qianniucity.feishu.cn/wiki/Mdl5wCNN4irNUAkOFetcUY6inod
标签
#MCP #文件上下文提取 #多查询搜索 #AI开发 #缓存管理
- Author:二师兄
- URL:https://cloudesx.com/article/llm-txt-mcp-server
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!