Sponsored by Deepsite.site

npm-package-mcp-server

Created By
Pratham12647 months ago
The npm-package-mcp-server allows users to efficiently access and analyze source code from any NPM package. With features like smart file discovery and selective code reading, it streamlines the process for developers. 🐙🌐
Content

npm-package-mcp-server

npm-package-mcp-server

Welcome to the npm-package-mcp-server repository! This project provides a server for fetching and exploring NPM package source code. Built with TypeScript, it supports package browsing, file extraction, and code analysis.

Table of Contents

Features

  • Package Browsing: Explore the available NPM packages easily.
  • File Extraction: Download specific files from packages for detailed analysis.
  • Code Analysis: Analyze the source code of packages to understand their structure and functionality.
  • TypeScript Support: Enjoy the benefits of TypeScript for type safety and improved development experience.

Installation

To get started, clone the repository to your local machine:

git clone https://github.com/Pratham1264/npm-package-mcp-server.git
cd npm-package-mcp-server

Next, install the necessary dependencies:

npm install

Usage

After installation, you can start the server with the following command:

npm start

You can then access the server at http://localhost:3000.

Fetching Packages

To fetch a package, use the following endpoint:

GET /api/packages/:packageName

Replace :packageName with the name of the package you want to explore.

Extracting Files

To extract files from a package, use:

POST /api/packages/:packageName/extract

Provide the necessary details in the request body to specify which files you want to download.

Analyzing Code

To analyze code, you can use:

GET /api/packages/:packageName/analyze

This will return insights into the structure and functionality of the specified package.

API

The API is designed to be straightforward and easy to use. Below are the main endpoints:

1. List Packages

GET /api/packages

This endpoint retrieves a list of available packages.

2. Get Package Details

GET /api/packages/:packageName

Fetch detailed information about a specific package.

3. Extract Files

POST /api/packages/:packageName/extract

Extract specific files from a package.

4. Analyze Code

GET /api/packages/:packageName/analyze

Analyze the source code of a package.

Contributing

We welcome contributions to the npm-package-mcp-server! If you have ideas for improvements or new features, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature.
  3. Make your changes.
  4. Commit your changes and push to your fork.
  5. Create a pull request.

Please ensure your code adheres to the project's coding standards.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

To download the latest release, visit Releases. Make sure to download and execute the necessary files to get started.

You can also check the Releases section for previous versions and updates.

Topics

This project covers various topics, including:

  • Code Analysis: Understand the structure of packages.
  • Developer Tools: Tools for developers to work with NPM packages.
  • MCP: Model Context Protocol for enhanced communication.
  • Package Explorer: A tool to explore package contents easily.
  • Source Code: Access to the source code of various packages.

Conclusion

The npm-package-mcp-server is a powerful tool for developers looking to explore and analyze NPM packages. With its TypeScript foundation and robust features, it streamlines the process of fetching and understanding package source code.

For more information, visit the Releases section to stay updated with the latest changes and features.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic