packagelens-mcp

Example Queries

This document provides comprehensive examples of queries for PackageLens MCP. We recommend using smart queries (no ecosystem needed) for most use cases. Use ecosystem-specific queries only when you need fine-grained control.

Supported Ecosystems


PackageLens features automatic ecosystem detection - you don’t need to specify npm, PyPI, Crates.io, etc. Just ask naturally!

How It Works

Smart queries use a 3-step detection strategy:

  1. Query keywords - Detects language mentions in your query (Python, Rust, JavaScript, etc.)
  2. Codebase analysis - If no keywords found, checks your current directory for package files (package.json, requirements.txt, Cargo.toml, etc.)
  3. User clarification - If still uncertain, asks you to specify the language/ecosystem rather than guessing

This means in most cases, you don’t need to specify the ecosystem - it will auto-detect from your project context!

Smart Search Examples

Search without specifying ecosystems (include language context for best results):

Find JavaScript HTTP client libraries

Search for Python web frameworks

Find async runtime packages for Rust

Look for Ruby authentication gems

Find Elixir serialization libraries

Search for PHP testing tools

Find Rust database drivers

Search for TypeScript validation libraries

Note: Generic queries without language context (e.g., “Find HTTP clients”) will auto-detect from your codebase. If you’re in a directory with package.json, it searches npm. If you have Cargo.toml, it searches Crates.io, etc. Only prompts for clarification if no package files are found.

Smart Package Info Examples

Get package details without specifying ecosystem:

Tell me about react

Show me details for django

Get info for rails

Get information about tokio

Tell me about express

Show me info for flask including README

Smart Usage Examples

Get usage snippets without specifying ecosystem:

Show me how to use axios

Get usage example for flask

How do I use tokio?

Show me example code for express

Smart Versions & Dependencies

Check versions and dependencies without ecosystem:

What versions of react are available?

Show me django versions from last 6 months

What does express depend on?

Show me dependencies for tokio

Smart Downloads

Get download stats without ecosystem:

How many downloads does react have?

Show me weekly downloads for django

Get download stats for tokio

Ecosystem-Specific Queries

Use these when you need to explicitly specify an ecosystem (advanced use).

Search Queries

Search for React state management libraries in npm

Search for HTTP client libraries in PyPI

Find Ruby web frameworks in RubyGems

Search for async runtime packages in Crates.io

Find Laravel packages in Packagist

Search for Phoenix plugins in Hex

Search with Size Limits

Find the top 10 testing libraries in npm

Show me 5 authentication packages in PyPI

Get 3 most popular ORMs in RubyGems

Find 20 serialization crates in Crates.io

List 15 logging packages in Packagist

Show 8 database libraries in Hex

Multi-Keyword Search (AND operator)

Find npm packages with react AND hooks AND typescript

Search PyPI for packages with fastapi AND async AND database

Find RubyGems with rails AND authentication AND jwt

Search Crates.io for tokio AND http AND client

Find Packagist packages with symfony AND validation AND forms

Search Hex for phoenix AND realtime AND channels

Multi-Keyword Search (OR operator)

Find npm packages with express OR fastify OR koa

Search PyPI for django OR flask OR fastapi

Find RubyGems with sinatra OR rails OR hanami

Search Crates.io for actix OR rocket OR warp

Find Packagist packages with laravel OR symfony OR codeigniter

Search Hex for phoenix OR cowboy OR plug

Package Information

Get README

Get the README for react in npm

Show me the README for requests in PyPI

Fetch the README for rails in RubyGems

Get documentation for tokio in Crates.io

Show the README for laravel/framework in Packagist

Get the README for phoenix in Hex

Get Specific Version README

Get the README for react version 18.2.0 in npm

Show me the README for requests version 2.31.0 in PyPI

Fetch the README for rails version 7.0.0 in RubyGems

Get documentation for tokio version 1.35.0 in Crates.io

Show the README for laravel/framework version 10.0.0 in Packagist

Get the README for phoenix version 1.7.0 in Hex

Get Truncated README

Get the first 500 characters of the README for express in npm

Show me a preview (1000 chars) of the flask README in PyPI

Package Metadata

Enriched Package Info

Get detailed information for typescript in npm including GitHub stats

Show me complete info for numpy in PyPI with downloads and stars

Get package info for devise in RubyGems including repository details

Fetch detailed info for serde in Crates.io with GitHub metrics

Get complete package data for guzzlehttp/guzzle in Packagist

Show me detailed info for ecto in Hex including download stats

Info with README

Get package info for axios in npm including the README

Show me complete info for pandas in PyPI with README included

Get detailed info for puma in RubyGems including documentation

Version Information

List All Versions

List all versions of react in npm

Show me all versions of django in PyPI

Get all versions of rails in RubyGems

List all versions of tokio in Crates.io

Show all versions of symfony/console in Packagist

Get all versions of phoenix in Hex

Recent Versions (Time-based)

Show me TypeScript versions from the last 6 months

Get all numpy versions released in the last year

List rails versions from the last 3 months

Show me tokio versions from the last 90 days

Get laravel releases from the last 6 months

Show phoenix versions from the last year

Limited Version Lists

Show me the 10 most recent versions of react

Get the last 5 versions of requests

List the 20 most recent versions of rails

Dependencies

Basic Dependencies

What are the dependencies of express in npm?

Show me the dependencies of flask in PyPI

Get dependencies for rails in RubyGems

What does tokio depend on in Crates.io?

Show me dependencies for symfony/http-foundation in Packagist

Get dependencies for phoenix in Hex

Dependencies with DevDependencies (npm only)

Get all dependencies of typescript including devDependencies

Show me the dependencies of react with dev dependencies included

Specific Version Dependencies

Get dependencies for react version 18.2.0

Show me what django 4.2.0 depends on

Get dependencies for rails 7.0.8

What does tokio 1.35.0 depend on?

Download Statistics

Weekly Downloads (Default)

How many downloads does react get per week?

Show me weekly downloads for requests in PyPI (Note: not available)

Get weekly download stats for rails

What are the weekly downloads for tokio?

Show me download stats for laravel/framework

How many weekly downloads does phoenix get?

Daily Downloads

Get daily download stats for express

Show me daily downloads for rails

What are the daily downloads for reqwest?

Monthly Downloads

Get monthly download stats for typescript

Show me monthly downloads for puma in RubyGems

What are the monthly downloads for serde in Crates.io?

Usage Examples

Extract Code Snippets

Show me a usage example for axios in npm

Get a code snippet for requests in PyPI

Show me how to use devise in RubyGems

Get usage example for tokio in Crates.io

Show me example code for guzzlehttp/guzzle in Packagist

Get usage snippet for phoenix in Hex

Package Comparison

Compare Across Same Ecosystem

Compare react, vue, and angular in npm

Compare django, flask, and fastapi in PyPI

Compare rails, sinatra, and hanami in RubyGems

Compare tokio, async-std, and smol in Crates.io

Compare laravel/framework, symfony/symfony, and codeigniter/framework in Packagist

Compare phoenix, cowboy, and plug in Hex

Compare Across Different Ecosystems

Compare express (npm), flask (PyPI), sinatra (RubyGems), and actix-web (Crates.io)

Compare react (npm), django (PyPI), rails (RubyGems), and yew (Crates.io)

Compare axios (npm), requests (PyPI), httparty (RubyGems), and reqwest (Crates.io)

Compare jest (npm), pytest (PyPI), rspec (RubyGems), and cargo-test (Crates.io)

Compare sequelize (npm), sqlalchemy (PyPI), active-record (RubyGems), and diesel (Crates.io)

Compare webpack (npm), setuptools (PyPI), bundler (RubyGems), and cargo (Crates.io)

Complex Multi-Step Queries

Research & Decision Making

I need an HTTP client library for Python. Search PyPI for http client packages,
show me the top 5 results, then compare requests, httpx, and aiohttp with their
download stats and GitHub stars.

Find GraphQL server libraries in npm, get detailed info for apollo-server and
express-graphql including their READMEs, then show me usage examples for both.

I want to add authentication to my Rails app. Search RubyGems for authentication
packages, compare devise, clearance, and sorcery, then show me the README for
the most popular one.

Search Crates.io for async runtime packages, compare tokio and async-std with
their dependencies and download stats, then show me usage examples for the winner.

Ecosystem Migration

I'm moving from Express (npm) to FastAPI (PyPI). Show me both frameworks,
compare their features, get usage examples for both, and list their dependencies.

Compare web frameworks across ecosystems: express (npm), flask (PyPI),
sinatra (RubyGems), actix-web (Crates.io), and show me which has better
documentation and more active development.

Package Evaluation

Evaluate the typescript package in npm: show me its latest version, weekly
downloads, GitHub stars, all versions from the last 6 months, dependencies,
and usage examples.

I need to understand the django ecosystem. Get Django's README, compare django
with flask and fastapi, show me django's dependencies, and get download stats
for all three.

Version Analysis

Show me all versions of react from the last year, get the README for the
latest version, show me the dependencies for version 18.0.0 vs 18.2.0, and
tell me which versions are most downloaded.

Compare the evolution of rails: show me versions from the last 2 years, get
dependencies for rails 6.1.0 vs 7.0.0, and show me the changelog via README.

Additional Ecosystem Examples

npm (JavaScript/TypeScript)

Find TypeScript type definition packages in npm

Search for React hooks libraries with custom weights

Get all webpack plugins

Compare bundlers: webpack, vite, rollup, parcel, and esbuild

Show me Express middleware packages

PyPI (Python)

Find machine learning libraries in PyPI

Search for Django extensions

Get all Flask plugins

Compare ML frameworks: tensorflow, pytorch, scikit-learn, and keras

Show me async libraries for Python

RubyGems (Ruby)

Find Rails gems for authentication

Search for testing frameworks in Ruby

Get all ActiveRecord adapters

Compare web servers: puma, unicorn, and passenger

Show me background job processors

Crates.io (Rust)

Find async runtime crates

Search for web frameworks in Rust

Get all tokio ecosystem crates

Compare HTTP clients: reqwest, hyper, and ureq

Show me serialization libraries

Packagist (PHP)

Find Laravel packages for payments

Search for Symfony bundles

Get all PSR implementations

Compare frameworks: Laravel, Symfony, and CodeIgniter

Show me PHP testing frameworks

Hex (Elixir)

Find Phoenix LiveView components

Search for Ecto adapters

Get all Plug middleware

Compare web frameworks: Phoenix, Cowboy, and Plug

Show me OTP libraries

Advanced Query Patterns

Dependency Tree Analysis

Show me the dependency tree for webpack in npm

Get all dependencies of django recursively in PyPI

What packages depend on rails in RubyGems? (Show reverse dependencies)

Version Compatibility

Get dependencies for react 17.x vs 18.x and show me what changed

Compare tokio 0.2 dependencies vs 1.0 dependencies

Show me breaking changes between rails 6 and rails 7

Security & Updates

Show me all versions of lodash from the last month (to check for security updates)

Get the latest version info for all my dependencies (list them first)

Compare the release cadence of express vs fastify in the last year

Performance & Popularity

Compare download trends: show me weekly downloads for react, vue, angular,
svelte, and solid-js

Find the most downloaded testing libraries in npm

Show me the top 10 most starred Python packages on GitHub

Documentation Deep Dive

Get READMEs for all major GraphQL implementations: apollo-server (npm),
graphene (PyPI), graphql-ruby (RubyGems), and juniper (Crates.io)

Show me usage examples for all major HTTP clients across all ecosystems

Compare API documentation quality across web frameworks

Tips for Effective Queries

Include Language Context

For best results with smart search, include the language or ecosystem in your query:

âś… "Search for Python HTTP clients" (auto-detects PyPI)
âś… "Find JavaScript validation libraries" (auto-detects npm)
âś… "Search for HTTP clients in PyPI" (explicit ecosystem)
⚠️ "Search for HTTP clients" (will ask you to clarify)

Use Natural Language

PackageLens understands natural language:

"Find me the top 5 React state management libraries"
"What are the dependencies of express?"
"Compare axios and fetch in npm"

Combine Multiple Operations

Chain operations in a single query:

"Search for authentication packages in npm, show me the top 3 results,
then get detailed info for each including their GitHub stars and weekly downloads"

Specify Time Ranges

Use relative or absolute dates:

"Show me versions from the last 6 months"
"Get releases since 2023-01-01"
"List versions from the last year"

Request Specific Metrics

Ask for exactly what you need:

"Compare react and vue showing weekly downloads, GitHub stars, and license"
"Get typescript info with README but without dependencies"
"Show me minimal info for lodash (just version and downloads)"

Query Templates

Template: Ecosystem Research

"I need to choose a [CATEGORY] library for [ECOSYSTEM].
Search for [KEYWORDS], show me the top [N] results,
compare the most popular ones with their stats,
and show me usage examples for the winner."

Example:

"I need to choose a web framework for Rust.
Search Crates.io for web frameworks, show me the top 5 results,
compare actix-web, rocket, and warp with their stats,
and show me usage examples for the most downloaded one."

Template: Version Migration

"I'm upgrading from [PACKAGE] version [OLD_VERSION] to [NEW_VERSION] in [ECOSYSTEM].
Show me the README for both versions, compare their dependencies,
and highlight what changed."

Example:

"I'm upgrading from react version 17.0.0 to 18.2.0 in npm.
Show me the README for both versions, compare their dependencies,
and highlight what changed."

Template: Cross-Ecosystem Comparison

"Compare [CATEGORY] across ecosystems: [PKG1] ([ECO1]), [PKG2] ([ECO2]),
[PKG3] ([ECO3]). Show me downloads, GitHub stars, and licenses."

Example:

"Compare HTTP clients across ecosystems: axios (npm), requests (PyPI),
httparty (RubyGems), reqwest (Crates.io). Show me downloads, GitHub stars,
and licenses."

Notes

Ecosystem-Specific Limitations

Rate Limiting

Caching

This helps reduce API calls and improve response times for repeated queries.