Catalog PyPI
PACKAGE EXPLORERView in registry

ai-code-recorder-client

PyPI

AI代码记录器 MCP 客户端 - 通过 MCP 协议记录 AI 生成的代码片段

aicodecursordevelopmentmcprecorder
Versions collected1
Direct dependencies2From release 1.0.3
Last observed21 Oct, 10:13 UTC

README

Version 1.0.3 documentation

AI代码记录器客户端

AI代码记录器的 MCP 客户端,运行在本地,通过 MCP 协议与 Cursor 集成,获取 Git 信息并将 AI 生成的代码片段上报到远程服务器。

当前版本: v1.0.2
PyPI: ai-code-recorder-client
架构: 客户端本地运行 + 远程API服务器

一. 介绍与特性

  • 自动收集 Git 仓库信息(仓库地址、分支、提交等)
  • 记录 AI 生成的代码片段及上下文信息到远程服务器
  • 与 Cursor 通过 MCP 协议无缝集成
  • 提供基础工具:获取仓库信息、记录代码、生成 AGENTS 指南

二. 环境要求

  • Python 版本:3.8 ~ 3.12
  • 操作系统:Windows / macOS / Linux(推荐 macOS 或 Linux)
  • Cursor 已安装并支持 MCP 配置

三. 安装

从 PyPI 安装(推荐):

pip install ai-code-recorder-client

从源码安装(开发用):

# 克隆仓库并进入客户端目录
git clone https://github.com/ai-code-team/ai-code-recorder.git
cd ai-code-recorder/client

# 安装开发版本
pip install -e .

四. 在 Cursor 中配置 MCP

编辑 ~/.cursor/mcp.json(无则创建):

{
  "mcpServers": {
    "ai-code-recorder": {
      "command": "uvx",
      "args": ["ai-code-recorder-client"]
    }
  }
}

说明:

  • 可执行入口为 ai-code-recorder-client(pyproject.toml 的 project.scripts 中定义)
  • 该客户端以 stdio 模式运行,无需额外端口配置

五. 可用工具说明

create_agents_guide

  • 功能:在项目根目录创建或更新 AGENTS.md,给智能体提供使用规范
  • 参数:project_root(可选)。不指定则使用当前工作目录

get_repository_info

  • 功能:获取本地 Git 仓库与用户信息
  • 参数:
    • project_root(必填):客户端项目的根目录绝对路径
    • file_path(可选):文件的相对或绝对路径
  • 返回:JSON 字符串,包含 repository_info 与 user_info

record_code_snippet

  • 功能:记录 AI 生成的代码片段到远端
  • 核心参数:filename、language、source、code(建议提供完整信息)
  • 可选参数:file_path、project_context、repository_url、git_branch、commit_hash、meta
  • 说明:工具会自动从本地获取Git信息并上报到远程API服务器进行存储分析

六. 开发与发布

本地开发:

git clone https://github.com/ai-code-team/ai-code-recorder.git
cd ai-code-recorder/client
pip install -e .

发布到 PyPI:

  1. 安装发布工具
pip install build twine
  1. 配置 PyPI API Token(示例)
export PYPI_API_TOKEN="pypi-your-token-here"
  1. 一键发布(在 client/ 目录执行)
./release.sh

发布脚本将执行:清理、构建、检查、安装测试与发布等步骤。

七. 许可证

MIT License,详见仓库内 client/LICENSE。

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.315 Sept 20252

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ai-code-team/ai-code-recorder

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:07325ed11d679ad6538c0e9ddbd1d24f7c845cba793951ee72787300d6e3f596