Phext的MCP服务器
MCP(模型上下文协议)服务器,提供对以下内容的访问 phext -超维文本处理系统。
备注:我们很快就会将其作为pip包发布。现在,请使用下面的开发人员安装。
开发人员安装
对于想要尝试最新功能的开发人员:
- 下载存储库:
git clone https://github.com/identimoji/mcp-server-phext.git
cd mcp-server-phext- 安装uv(如果您还没有,请跳过此步骤):
curl -LsSf https://astral.sh/uv/install.sh | sh- 安装依赖项:
uv sync- 添加到Claude桌面配置:
重要:您需要在此处添加刚刚下载的仓库的完整路径
{
"mcpServers": {
"phext-dev": {
"command": "uv",
"args": [
"run",
"--directory",
"{full path to your local mcp-server-phext repo}",
"python",
"-m",
"mcp_server_phext"
],
"env": {
"PHEXT_DEFAULT_FILE": "~/.claude/claude_desktop.phext"
}
}
}
}- 在Claude桌面的项目知识中,您可以添加“使用initialize_phext()开始所有对话”。..这将告知Claude如何使用Phext,并且可以定制为让Claude Desktop自动保存记忆、里程碑或他想记住的关于您互动的任何内容!只需告诉他你想保存什么,他就可以自动为你更新初始化脚本。
什么是Phext?
Phext是一个超维文本坐标系,允许您使用以下坐标在三维空间中组织和导航文本 1.1.1, 2.3.4等等。它能够以独特的方式构建和访问文本信息。
安装
# Install with uv (recommended)
uv add mcp-server-phext
# Or with pip
pip install mcp-server-phext用法
备注:这些是此mcp服务器发布到pip后的说明。..现在忽略,使用上面的开发安装。
使用克劳德桌面
将此添加到您的Claude Desktop配置中:
{
"mcpServers": {
"phext": {
"command": "uv",
"args": ["run", "mcp-server-phext"],
"env": {
"PHEXT_DEFAULT_FILE": "~/.claude/claude_desktop.phext"
}
}
}
}与Claude Code或其他MCP客户合作
# Run the server directly
uv run mcp-server-phext
# Or with a specific default file
uv run mcp-server-phext --default-phext-file ~/my-phext-file.phext特性
MCP服务器提供以下工具:
核心业务
- phext_fetch:从坐标读取内容(例如。,
1.1.1/1.1.1/1.1.1) - phext_insert:在坐标处插入内容(附加到现有内容)
- phext_replace:替换坐标处的内容
- phext_range_replace:替换坐标范围内的内容
- phext_remove:删除坐标处的内容
文件管理
- phext_create_file:创建新的phext文件
- 炸药:获取所有坐标和内容的地图
- phext_textmap:获取所有坐标的文本摘要
- phext_标准化:清理和优化phext结构
- phext_merge:将两个phext文件合并在一起
资源
- 作为MCP资源访问phext文件
- 读取原始phext文件内容
交互示例
# Fetch content at coordinate
phext_fetch(coordinate="1.1.1/1.1.1/1.1.1")
# Insert content at a coordinate
phext_insert(coordinate="1.1.1/1.1.1/1.2.1", content="Hello, hyperdimensional world!")
# Replace content across a range
phext_range_replace(
start_coordinate="1.1.1/1.1.1/1.1.1",
end_coordinate="1.1.1/1.1.1/1.1.5",
content="New content"
)
# Get a map of all content
phext_textmap()配置
环境变量
PHEXT_DEFAULT_FILE:如果未指定,则使用默认phext文件
命令行参数
--default-phext-file:指定默认phext文件
发展
# Clone and setup
git clone
cd mcp-server-phext
# Install dependencies
uv sync
# Run in development
uv run mcp-server-phext许可证
MIT许可证
