Skip to main content
Glama

Octocode MCP

by bgauryy

npmViewPackage

Retrieve detailed NPM package information, including version history, dependencies, repository URLs, and exports structure. Ideal for analyzing package metadata and integrating with GitHub for source code exploration.

Instructions

View NPM package information using 'npm view' command. Supports field-specific queries and GitHub repository discovery.

WHEN TO USE: Use when users ask questions about npm packages - provides comprehensive package data and insights.

KEY INSIGHTS:

  • Git repository URL for source code exploration
  • Package exports structure (understand API surface and dependencies)
  • Dependencies/devDependencies for ecosystem analysis
  • Version history, size, performance metrics
  • License and author information

CAPABILITIES:

  • Full package info: npm view <package> --json (optimized format)
  • Single field: npm view <package> <field> (version, description, license)
  • Multiple fields: filtered JSON response for specific fields
  • Repository URLs for GitHub integration and source code analysis

Input Schema

NameRequiredDescriptionDefault
fieldNoOptional field to get specific information (e.g., "version", "description", "license"). If not provided, returns full package info.
matchNoSpecific field(s) to retrieve. Can be single field or array of fields. Examples: "version", ["version", "description"], ["dependencies", "devDependencies"]. When used, returns only the specified fields. use repository to get the repository url in github
packageNameYesNPM package name (e.g., "react", "express", "@types/node"). Include @ prefix for scoped packages.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "field": { "description": "Optional field to get specific information (e.g., \"version\", \"description\", \"license\"). If not provided, returns full package info.", "type": "string" }, "match": { "anyOf": [ { "enum": [ "version", "description", "license", "author", "homepage", "repository", "dependencies", "devDependencies", "keywords", "main", "scripts", "engines", "files", "publishConfig", "dist-tags", "time" ], "type": "string" }, { "items": { "enum": [ "version", "description", "license", "author", "homepage", "repository", "dependencies", "devDependencies", "keywords", "main", "scripts", "engines", "files", "publishConfig", "dist-tags", "time" ], "type": "string" }, "minItems": 1, "type": "array" }, { "type": "string" } ], "description": "Specific field(s) to retrieve. Can be single field or array of fields. Examples: \"version\", [\"version\", \"description\"], [\"dependencies\", \"devDependencies\"]. When used, returns only the specified fields. use repository to get the repository url in github" }, "packageName": { "description": "NPM package name (e.g., \"react\", \"express\", \"@types/node\"). Include @ prefix for scoped packages.", "minLength": 1, "type": "string" } }, "required": [ "packageName" ], "type": "object" }
Install Server

Other Tools from Octocode MCP

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bgauryy/octocode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server