MC

manthan29-code/codescope-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1 stars 0 forks 质量 71 趋势 22

CodeScope MCP 为大型语言模型和人工智能助手提供可控、智能且上下文高效的本地代码库访问。

概览

CodeScope MCP 为大型语言模型和人工智能助手提供可控、智能且上下文高效的本地代码库访问。 CodeScope 不再天真地倾倒整个文件夹或用垃圾文件(node_modules、.venv、二进制文件、锁文件)淹没上下文窗口,而是作为安全和上下文防火墙,提供分层工具,支持代码库探索、代码搜索和文件检索。 在使用基于MCP的AI编码助手或LLM聊天代理时,授予原始文件系统访问权限通常会导致:1. : 巨大的文件夹如node_modules/、.git/、dist/或.venv/泛滥提示令牌。2. : 读取多兆字节文件或大型锁文件(package-lock.json、poetry.lock)。3. : 非意图将二进制或编译文件(.pyc、图片、.exe、.so)转储到文本提示中。4. : 路径穿越攻击(例如../../../../etc/passwd 或访问项目根以外的敏感文件)。 弥合了这一鸿沟。

概述(AI 翻译)

智能且代币优化的代码库上下文MCP服务器,专为云聊天大型语言模型(Claude、ChatGPT、Gemini)构建。

CodeScope MCP 通过 Model Context 协议(MCP) 通过 可流式 HTTP 传输,为基于云的聊天大型语言模型应用提供受控、智能且上下文高效的本地代码库访问。

CodeScope 不再天真地倾倒整个文件夹或用垃圾文件(node_modules、.venv、二进制文件、锁文件)淹没上下文窗口,而是作为安全和上下文防火墙,提供分层工具包,支持代码库探索、代码搜索和文件检索。


📑 目录

  • 这是关于什么的
  • 目标受众:为云聊天大型语言模型(非 AI IDE)设计
  • 为什么你应该使用它
  • 它的功能(核心工具)
  • 架构概述
  • 系统流程与分层发现
  • 项目结构
  • 入门指南
  • 先决条件
  • 安装与设置
  • 环境配置
  • 配置与尺寸指南
  • 运行服务器
  • 使用写作工具与人工智能提示
  • 用ngrok曝光(远程/云设置)
  • 连接MCP客户端
  • 远程连接器指南(Claude、ChatGPT、Gemini)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🔭 CodeScope MCP

Intelligent, Token-Optimized Codebase Context MCP Server Built for Cloud Chat LLMs (Claude, ChatGPT, Gemini).

CodeScope MCP provides cloud-based Chat LLM applications with controlled, intelligent, and context-efficient access to local codebases over the Model Context Protocol (MCP) using Streamable HTTP transport.

Instead of naively dumping entire folders or overwhelming context windows with garbage files (node_modules, .venv, binaries, lock files), CodeScope acts as a security and context firewall, offering a layered toolset for codebase exploration, code search, and file retrieval.


📑 Table of Contents


💡 What This Is About

When using AI coding assistants or LLM chat agents over MCP, granting raw filesystem access often leads to:

  1. Context Window Blowup: Giant folders like node_modules/, .git/, dist/, or .venv/ flooding prompt tokens.
  2. High Token Costs & Slow Responses: Reading multi-megabyte files or large lock files (package-lock.json, poetry.lock).
  3. Binary Corruption: Unintended dumping of binary or compiled files (.pyc, images, .exe, .so) into text prompts.
  4. Security Vulnerabilities: Path traversal attacks (e.g. ../../../../etc/passwd or accessing sensitive files outside project roots).

CodeScope MCP bridges this gap. It provides a standardized MCP server built on FastMCP with Streamable HTTP that delivers smart, token-efficient, .gitignore-aware file reading, fast code/regex search, and metadata analysis.


🎯 Target Audience: Built for Cloud Chat LLMs (Not for AI IDEs)

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "codescope": { "url": "http://127.0.0.1:8000/mcp", "transport": "streamable-http" } } }