npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

c7-mcp-server

v1.0.1

Published

An unofficial MCP server for Context7 by Upstash

Readme

Context7 MCP Server (c7-mcp-server)

License: MIT

A Model Context Protocol (MCP) server that acts as a bridge to the Context7 API.

This server allows MCP-compatible clients (like Claude Desktop, IDE plugins, custom applications) to easily interact with Context7's features, including querying documentation context, searching for projects, and retrieving project metadata. It exposes the c7-mcp-server command when installed globally.

⚠️ Important: All data provided through this server comes directly from the official Context7 API (https://context7.com). This server simply provides an MCP interface to that API and does not generate or host any content itself.

Features

Exposes Context7 functionalities via standard MCP capabilities:

  • Tools:
    • c7_query: Query the Context7 API for information on a specific topic within a project. Accepts project name, query text, optional format (txt/json), and optional token limit.
    • c7_search: Search for available Context7 projects by keyword. Returns a list of matching projects (title and usable name).
    • c7_info: Get metadata about a specific Context7 project (like source repository, last update, etc.).
  • Resources:
    • c7_projects_list: Provides a list of all available (valid) Context7 projects via the URI context7://projects/list.

Installation

Prerequisites

  • Node.js (Version 18+ recommended)
  • npm (usually comes with Node.js) or Bun

Option 1: Install from npm (Recommended for Users)

Once published, install the server globally:

npm install -g c7-mcp-server

This will make the c7-mcp-server command available system-wide, allowing MCP clients to launch it.

Option 2: Install from Source (for Development)

  1. Clone the repository:
    git clone <your-repo-url>
    cd c7-mcp-server
  2. Install dependencies:
    npm install
    # or if using Bun
    # bun install
  3. Build the server:
    npm run build
  4. Link the command locally:
    npm link
    # or if using Bun
    # bun link

This will make the c7-mcp-server command available on your local machine for testing and development.

Usage

This server is designed to be run by an MCP client application, not typically directly by an end-user (except for testing). The client launches the c7-mcp-server command, and they communicate over standard input/output (stdio) using the MCP protocol.

Configuring with Clients (Example: Claude Desktop)

To use this server with a client like Claude Desktop, you need to add it to the client's configuration file.

  1. Ensure c7-mcp-server is installed globally (npm install -g c7-mcp-server) or linked locally (npm link).

  2. Edit the client's configuration file (e.g., claude_desktop_config.json):

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add an entry under mcpServers:

    {
      "mcpServers": {
        "context7": {
          "command": "c7-mcp-server", // The command name installed/linked
          "args": [] // No arguments needed by default for stdio transport
          // "env": {} // Add environment variables if needed
        }
        // ... other servers ...
      }
    }
  4. Restart the client application (e.g., Claude Desktop). The client will now launch c7-mcp-server in the background and connect to it.

Testing with MCP Inspector

You can test the server directly using the MCP Inspector:

  1. Make sure c7-mcp-server is installed globally or linked locally.

  2. Run the inspector, telling it to execute your server command:

    npx @modelcontextprotocol/inspector c7-mcp-server
  3. The Inspector UI will open in your browser, connected to your server. Use the "Tools" and "Resources" tabs to interact with the server's capabilities. Check the "Notifications" pane for logs/errors from the server.

MCP Capabilities Details

Tools

  • c7_query

    • Description: Query the Context7 API for information on a specific topic within a project.
    • Parameters (object):
      • projectname (string, required): The exact project name (e.g., nextjs).
      • query (string, required): The topic/question to query.
      • format (enum: "txt" | "json", optional, default: "txt"): Output format.
      • tokens (number, optional): Maximum number of tokens for the response.
    • Returns: Text content containing the result from Context7 (either plain text or a JSON string).
  • c7_search

    • Description: Search for available Context7 projects by keyword.
    • Parameters (object):
      • term (string, required): The keyword to search for in project titles.
    • Returns: Text content containing a JSON string array of matching projects, each with title and name (the usable project name).
  • c7_info

    • Description: Display metadata about a specific Context7 project.
    • Parameters (object):
      • projectname (string, required): The exact project name.
    • Returns: Text content containing a JSON string representation of the project's full metadata.

Resources

  • c7_projects_list
    • URI: context7://projects/list
    • Description: Provides a list of all available and valid Context7 projects.
    • Returns: Content with mimeType: "application/json" containing a JSON string array of project objects.

Development

  1. Clone the repository.
  2. Install dependencies (npm install or bun install).
  3. Build the server (npm run build). Use npm run dev for automatic rebuild and start during development.
  4. Link for local testing (npm link or bun link).
  5. Test using the MCP Inspector (npx @modelcontextprotocol/inspector c7-mcp-server).
  6. Make your changes in the src/ directory and rebuild.

License

MIT