Get the FREE Ultimate OpenClaw Setup Guide →

pypreader

This is an MCP service that assists in AI programming. It can read the source code of third - party libraries and their basic description documents, etc. It is very suitable for use with AI IDEs. 这是个辅助AI编程的MCP服务,能够读取第三方库的源代码,读取第三方库的基本描述文档之类的,非常适合搭配AI IDE使用。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zakahan-pypreader-mcp uvx --from git+https://github.com/zakahan/pypreader-mcp.git pypreader-mcp \
  --env CURRENT_PYTHON_PATH="<your-python-path>" \
  --env CURRENT_LOGGING_LEVEL="INFO"

How to use

pypreader-mcp exposes a set of tools that let AI agents inspect Python packages installed in a target environment. It enables actions such as retrieving a package description from PyPI, listing the files and directory structure of an installed package, fetching the source code of a specific file, and extracting the code snippet for a particular symbol (function, class, etc.). This allows models to reason about dependencies, understand library internals, and perform tasks like code analysis or automated programming assistance with direct access to real package contents. To use it, configure an MCP server entry in your AI environment (for example Cursor or Trae) using the provided uvx-based command, which references the Git repository and the entry point of the MCP server. Once configured, you can call the available tools by specifying the package name or path as required by each function.

How to install

Prerequisites:

  • Python 3.10+ and a suitable virtual environment (optional but recommended).
  • Access to install or run uvx from your environment.
  • Git installed for cloning or pulling from Git repositories.

Installation steps:

  1. Ensure Python is installed and available in your PATH. Verify with: python --version

  2. Install uvx (if not already available) and ensure it can install from Git URLs. The typical setup involves installing uvx-enabled access to Git-based MCP servers.

  3. Add a new MCP server entry in your AI environment configuration using the details provided in the README. For this project, the configuration uses uvx to fetch the server from Git and run the pypreader-mcp package:

{
  "mcpServers": {
    "PypReader-MCP": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/zakahan/pypreader-mcp.git",
        "pypreader-mcp"
      ],
      "env": {
        "CURRENT_PYTHON_PATH": "<your-python-path>",
        "CURRENT_LOGGING_LEVEL": "INFO"
      }
    }
  }
}
  1. Replace <your-python-path> with the path to the Python executable in your target environment if needed, or omit if you want to use the server’s default Python.

  2. Start or refresh the MCP configuration in your AI environment and verify that the server is reachable and responding to tool calls.

Additional notes

Tips and considerations:

  • The server uses uvx to install and run the MCP from the Git repository. Ensure your environment allows outbound Git or HTTP access to fetch the repository.
  • The env variables CURRENT_PYTHON_PATH and CURRENT_LOGGING_LEVEL control which Python environment is used by the server and the verbosity of logs. Adjust as needed for debugging or production use.
  • If you encounter path or import-related issues, you may need to align the Python executable path with the environment where the target packages are installed (especially within virtual environments).
  • This MCP server focuses on reading package metadata, directory structure, and source code, which can help AI agents understand dependencies, inspect code, and perform analyses without external internet access beyond the local environment.
  • Keep the server repository up to date to benefit from improvements like the Windows compatibility changes in get_source_code_by_symbol.

Related MCP Servers

Sponsor this space

Reach thousands of developers