Back to MCP directory
publicPublicdnsLocal runtime

mcp-context-template

MCP Context Template是一个集中管理AI工具上下文的仓库,旨在降低上下文共享成本并提升开发效率,为团队提供统一的AI协作标准和文档结构。

article

README

🚀 MCP上下文模板

MCP上下文模板 是一个用于集中管理AI工具(MCP)的仓库。它的主要价值在于降低上下文共享成本,显著提升开发效率。作为中央上下文存储库,它能助力Claude Code和Cursor AI等现代AI工具,让它们更好地理解企业代码库和开发实践。

🚀 快速开始

项目集成

  • 在项目的 .cloderc 或Cursor设置中指定 context path
  • 在Claude Code提示中明确引用:“请参考以下指南:[路径]”。
  • 示例:基于 context/backend/service-patterns.md 的重构请求
重构请求:
请根据 context/backend/service-patterns.md 中定义的服务模式,对以下代码进行重构。

[插入代码]

文档贡献指南

  • 通过Pull Request的形式进行贡献。
  • 所有约定文档均使用Markdown格式编写。
  • 重大上下文结构变更需先提出Issue讨论。
  • 确保上下文简洁明了,便于AI理解。

提示编写示例

prompts/test-generation.md 示例:

## 目的

服务单元测试自动化用Claude提示示例

## 提示

请为以下服务类方法生成单元测试代码:
- 测试框架:JUnit5
- 模拟:MockK
- 使用 Given-When-Then 格式
- 测试目标方法:

```kotlin
fun getUserById(id: Long): User

✨ 主要特性

  • 作为独立于项目的公共上下文存储库,可进行统一管理。
  • 提供参考文档结构,有效提高与AI工具的合作效率。
  • 收录适用于不同团队和组织层级的示例与指南。
  • 实现跨项目的AI使用体验一致性。
  • 减轻重复性上下文管理的负担。

📚 详细文档

目录结构

ai-context/
├── README.md
├── context/
│   ├── backend/
│   │   ├── domain-overview.md
│   │   ├── service-patterns.md
│   │   └── test-guidelines.md
│   ├── frontend/
│   │   ├── component-structure.md
│   │   └── naming-convention.md
│   ├── mobile/
│   │   └── network-layer.md
│   └── shared/
│       ├── business-terms.md
│       └── naming-style.md
├── prompts/
│   ├── refactoring.md
│   ├── test-generation.md
│   └── code-review.md
└── examples/
    ├── cursor-snippets.md
    └── claude-usage.md

📋 应用场景

  • 帮助新开发人员快速上手,理解代码风格和模式。
  • 实现自动化重复性工作,如生成测试代码和 boilerplate。
  • 自动生成符合标准的审查评论。
  • 支持代码库文档化工作。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client