Token导航 LogoToken导航

MCP Server · 开发工具

pyinspectmcp (Closed Systems)

PyOverview是一个CLI工具和MCP服务器,用于动态检查和理解Python模块、类和函数的结构与文档。

stdio官方级别未说明来源级核验工具 0
代码分析开发工具PythonClaude文档生成Claude Desktop

快速开始

作者 / 组织
closed-systems
提供方
closed-systems
运行时
Python

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

3

仓库热度

收录来源

1 个

MCP World

选型结论

pyinspectmcp (Closed Systems) 属于开发工具类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude,有可以直接复制的安装命令;接入前要先准备 OAuth 授权。

分类

开发工具

传输方式

stdio

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

安装命令

uvx --from git+https://github.com/closed-systems/pyoverview pyoverview

客户端配置示例

{
  "mcpServers": {
    "pyinspectmcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/closed-systems/pyoverview",
        "pyoverview"
      ]
    }
  }
}

按公开安装命令拼出来的示例,字段名和参数以仓库 README 为准;带 YOUR_API_KEY 这类占位符的位置记得换成自己的值。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

Py概述

一个CLI工具和模型上下文协议(MCP)服务器,使您能够直接检查Python模块和类,提供全面的文档、方法、类和结构信息。

概述

PyOverview是一个功能强大的工具,它提供了Python模块和类的全面概述。它既可以用作独立的CLI工具,也可以用作MCP服务器,以弥合LLM和Python代码库之间的差距。它允许动态检查和理解Python模块、类、函数及其关系,而不需要静态分析或预先生成的文档。

但是为什么呢?

编码LLM通常基于过时的半熟文档做出决定,这些文档可能正在进行中(就像人类一样)。这个MCP切入了真相的源头,并经常展示文档中根本没有提到的方法,让你在正确的级别上与库进行交互。

> inspect the fastmcp.client module and note the functions useful for testing

⏺ I'll inspect the fastmcp.client module to identify functions useful for testing. Let me use
  the pyoverview MCP server to examine this module.

⏺ pyoverview - inspect_module (MCP)(target: "fastmcp.client")
  ⎿  🔬 Inspecting: fastmcp.client                                                            
     ├── 🏛️ Classes
     │   ├── BearerAuth - Base class for all authentication schemes.
     … +128 lines (ctrl+r to expand)

⏺ Now let me get more detailed information about the Client class and its methods, as this
  appears to be the main class for testing:

⏺ pyoverview - inspect_module (MCP)(target: "fastmcp.client.Client", short: false)
  ⎿  🔬 Inspecting: fastmcp.client.Client                                                     
     ├── 📦 Properties/Attributes
     │   ├── initialize_result: property
     … +300 lines (ctrl+r to expand)

⏺ Now let me also look at the transport classes, particularly FastMCPTransport which is
  mentioned as useful for testing:

⏺ pyoverview - inspect_module (MCP)(target: "fastmcp.client.FastMCPTransport")
  ⎿  🔬 Inspecting: fastmcp.client.FastMCPTransport                                           
     ├── 📦 Properties/Attributes
     │   └── _abc_impl: _abc_data
     … +21 lines (ctrl+r to expand)

⏺ Let me also check what testing utilities might be available in the auth module:

⏺ pyoverview - inspect_module (MCP)(target: "fastmcp.client.auth")
  ⎿  🔬 Inspecting: fastmcp.client.auth                                                       
     ├── 🏛️ Classes
     │   ├── BearerAuth - Base class for all authentication schemes.
     … +21 lines (ctrl+r to expand)

⏺ Based on my inspection of the fastmcp.client module, here are the key functions and classes
  useful for testing:

  Core Testing Classes

  Client - Main MCP client class with extensive testing capabilities:
  - Context manager support (async with client:)
  - Connection state checking (is_connected())
  - Session management with reference counting for reentrant contexts

  FastMCPTransport - In-memory transport ideal for unit tests:
  - Connects directly to FastMCP server instances in the same Python process
  - No network overhead, perfect for testing scenarios
  - Works with both FastMCP 2.x and 1.0 servers

  Key Testing Methods

  Tool Testing

  - call_tool(name, arguments) - High-level tool calling with automatic error raising
  - call_tool_mcp(name, arguments) - Raw MCP protocol tool calling, returns complete result
  object
  - list_tools() - Get available tools for validation

  Resource Testing

  - read_resource(uri) - Read resource contents
  - list_resources() - List available resources
  - list_resource_templates() - List resource templates

  Prompt Testing

  - get_prompt(name, arguments) - Retrieve rendered prompts
  - list_prompts() - List available prompts

  Connection Testing

  - is_connected() - Check connection state
  - ping() - Test server connectivity
  - new() - Create fresh client instances for independent test sessions

  Protocol Testing

  All methods have _mcp variants (e.g., call_tool_mcp()) that return raw MCP protocol results,
  useful for testing protocol compliance and error handling.

  Authentication Testing

  - BearerAuth - For testing bearer token authentication
  - OAuth - For testing OAuth flows (though less useful for unit tests)

  Testing Utilities

  The reentrant context manager design is particularly valuable for testing concurrent
  scenarios, allowing multiple async with client: blocks to share the same session safely.

  The FastMCPTransport is the most important class for testing as it enables in-process testing
   without network dependencies.

特性

  • 动态模块检查:在运行时导入和分析任何Python模块
  • 丰富的可视化:具有颜色编码类别的美丽树形结构输出
  • 综合分析:提取方法、类、属性和文档
  • 结构化数据:返回人类可读和机器可解析的结果
  • MCP集成:与Claude和其他兼容MCP的AI助手无缝集成

安全

MCP中的S代表安全。我建议您始终在某种沙箱中运行MCP,并将API和SSH密钥排除在它们的环境之外。就这个特定的MCP而言,您应该知道它正在对模块进行动态检查,即它们是由MCP执行的解释器加载的。如果模块编写奇怪,这可能会导致意外的代码执行和副作用。相应地管理自己。

安装

先决条件

  • Python 3.13或更高版本
  • uv包管理器(推荐)

使用uvx安装(推荐)

直接从GitHub运行,无需克隆:

uvx --from git+https://github.com/closed-systems/pyoverview pyoverview

使用uv进行安装

git clone https://github.com/closed-systems/pyoverview
cd pyoverview
uv sync

使用pip安装

git clone https://github.com/closed-systems/pyoverview
cd pyoverview
pip install -e .

用法

作为MCP服务器

运行服务器,使其对MCP兼容客户端可用:

python pyoverview.py --mcp

支持的目标格式

这 inspect_module 该工具接受各种目标格式:

  • 模块: src.sample_lib
  • 类: src.sample_lib.MyClass
  • 嵌套属性: module.submodule.ClassName

工具参考

inspect_module(target: str)

检查Python模块或类,并返回有关其结构的详细信息。

参数:

  • target:模块或类的完整导入路径(例如,“src.sample_lib”或“src.samples_lib.MyClass”)

退货:

  • 具有树形结构的富格式文本输出
  • 结构化数据包含:

- modules:带文档的子模块 - classes:带有文档字符串的类 - functions:带有签名和文档的函数/方法 - attributes:具有类型信息的属性和变量

输出示例

检查模块时(pyoverview),您将看到(打开短输出):

🔬 Inspecting: pyoverview
├── 📦 Properties/Attributes
│   ├── Dict: _SpecialGenericAlias
│   ├── List: _SpecialGenericAlias
│   └── server: FastMCP
├── 🔧 Methods/Functions
│   ├── inspect_module(target: str, short=False) -> fastmcp.tools.tool.ToolResult - A Python MCP (Module Control Panel) to inspect modules and classes.
│   ├── inspect_target(target_obj: Any) -> Dict[str, List[Dict]] - Inspects an object, builds a rich Tree, and returns a dictionary of its members.
│   └── render_tree(structure: Dict[str, List[Dict]], target: str, short) - 
├── 🏛️ Classes
│   ├── Any - Special type indicating an unconstrained type.
│   ├── Console - A high level console interface.
│   ├── FastMCP - Abstract base class for generic types.
│   ├── Path - PurePath subclass that can make system calls.
│   ├── TextContent - Text content for a message.
│   ├── ToolResult - 
│   └── Tree - A renderable for a tree structure.
└── 📦 Modules
    ├── importlib - A pure Python implementation of import.
    ├── inspect - Get useful information from live Python objects.
    └── sys - This module provides access to some objects used or maintained by the

询问此模块的LLM将看到上述内容,以及所请求模块/类的结构化JSON表示。由于可能导致的疯狂,我们不会迭代地检查模块。

在进行最终检查时,我发现富显示库实际上有自己的Python对象函数的奇特表示。它提供了更多的信息并使用了更多的颜色,我不确定额外的数据是否会帮助LLM或混淆它们的上下文。

项目结构

pyoverview/
-  README.md              # This file
-  pyproject.toml         # Project configuration
-  pyoverview.py          # Main CLI and MCP server implementation
-  uv.lock                # Dependency lock file

依赖项

  • fastmcp:用于构建MCP服务器的FastMCP框架
  • 富有的:丰富的文本和优美的格式

Claude桌面配置

要将此MCP服务器与Claude Desktop一起使用,请将以下内容添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "pyoverview": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/closed-systems/pyoverview", "pyoverview", "--mcp"],
    }
  }
}

贡献

  1. 分叉存储库
  2. 创建要素分支
  3. 进行更改
  4. 如果适用,添加测试
  5. 提交拉取请求

许可证

这个项目是开源的。请检查存储库以了解许可证详细信息。

例子

检查标准库模块

import asyncio
from pyoverview import inspect_module

async def inspect_datetime():
    # Inspect the datetime module
    result = await inspect_module("datetime")
    print(result.content[0].text)

    
    # Inspect a specific class
    result = await inspect_module("datetime.datetime")
    print(result.content[0].text)

asyncio.run(inspect_datetime())

故障排除

常见问题

  1. 模块声音错误:确保目标模块在Python路径中
  2. 属性错误:验证指定模块中是否存在类或属性
  3. 导入错误:检查是否已安装目标模块的所有依赖项

调试模式

有关详细的错误信息,请使用Python的verbose标志运行服务器:

python -v pyoverview.py --mcp

与开发工作流集成

PyOverview特别适用于:

  • 代码文档:从实时代码自动生成文档
  • API发现:探索不熟悉的代码库和库
  • 重构:了解类层次结构和依赖关系
  • 测试:验证模块结构和可用方法

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

Python开发Python本地部署代码分析文档生成MCP集成开发工具

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到OAuth 授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
pyinspectmcp (Closed Systems)

MCP World · 本页

0stdio有1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

pyinspectmcp (Closed Systems) 怎么安装?

公开资料给出的安装命令是 uvx --from git+https://github.com/closed-systems/pyoverview pyoverview,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

pyinspectmcp (Closed Systems) 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

pyinspectmcp (Closed Systems) 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

pyinspectmcp (Closed Systems) 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

pyinspectmcp (Closed Systems) 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP