Skip to main content

Context Engineering MCP Server

这是一个符合 Model Context Protocol (MCP) 标准的服务器,旨在为 Claude Desktop、Cursor 或其他 AI 助手提供"外部记忆"和"上下文管理"能力。

它实现了 Context Engineering 的核心理念,允许 AI 像操作系统一样管理自己的工作区状态。

✨ 功能

这个插件为你的 AI 助手添加了以下能力(Tools):

  1. context_init: 初始化 .ai/skills 和 .agent_memory 目录结构。
  2. context_state: 获取当前工作区的"快照"(包含目录树、Git状态、当前目标)。
  3. context_save_observation: 将长输出(如日志、API响应)保存到文件,只返回摘要。
  4. context_read_observation: 按需读取之前保存的观察结果。

📦 安装与配置

1. 作为 Python 包安装

# 在你的环境中安装
pip install .
# 或者直接使用 uv 运行(推荐)

2. 配置 Claude Desktop

编辑你的 Claude Desktop 配置文件(通常位于 ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "context-engineering": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/context_mcp",
        "run",
        "context-mcp"
      ]
    }
  }
}

注意:请将 /absolute/path/to/context_mcp 替换为你实际存放此项目的绝对路径。

3. 配置 Cursor (即将支持)

Cursor 目前正在积极集成 MCP,配置方式与 Claude Desktop 类似。

🛠️ 使用示例

一旦配置完成,你可以在对话中直接告诉 Claude:

"初始化一下上下文环境" -> Claude 会调用 context_init

"现在的项目状态是什么?" -> Claude 会调用 context_state

"运行 npm install 并帮我分析错误,输出可能很长,请注意使用外部记忆" -> Claude 会运行命令并使用 context_save_observation 保存结果。

Metadata

Release files for context-engineering-mcp-slicenfer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for context-engineering-mcp-slicenfer 0.1.0
File Interpreter ABI Platform
context_engineering_mcp_slicenfer-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / context_engineering_mcp_slicenfer-0.1.0-py3-none-any.whl

Download URL context_engineering_mcp_slicenfer-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5ddfd9daed9d46ec19ef611e9fdca2d7e609351b6223947cd624a66eed1836c
BLAKE2b-256 checksum
How to use checksums
2c1332507474cc60e2a28c4cf7fec59add9bbbb04ad1032feeac281b3e4bb7c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.3

Security for context-engineering-mcp-slicenfer 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page