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

generic-mcp-search-fetch

v1.0.6

Published

Generic MCP server with OpenAI-compliant search and fetch tools

Readme

Generic MCP Search-Fetch Server

A generic MCP server that provides OpenAI-compliant search and fetch tools without any external API dependencies. This server can be easily customized to work with any data source.

Features

  • OpenAI Compliant: Implements the exact tool specifications required for ChatGPT connectors and deep research
  • No External Dependencies: Works with local data sources without requiring API keys
  • Easy Customization: Simple to adapt for different data backends (database, API, vector store, etc.)
  • TypeScript Implementation: Modern, type-safe codebase

Quick Start

# Install dependencies
npm install

# Development mode
npm run dev

# Build and run
npm run build
npm start

Run the Published Package

Recent npm releases (10.x/11.x) ship npx as an alias of npm exec. In this mode the classic npx <pkg>@<version> syntax no longer injects the package's bin into PATH, so the shell prints command not found. Use the explicit --package flag instead:

npx --yes --package [email protected] generic-mcp-search-fetch --stdio

To always track the latest publish, swap @1.0.6 for @latest. The command keeps the process alive and speaks MCP over STDIO.

MetaMCP Configuration

When adding the server in MetaMCP (STDIO transport):

  • Command: /opt/homebrew/bin/npx (or your system's npx path)
  • Arguments: --yes --package [email protected] generic-mcp-search-fetch --stdio

As an alternative that bypasses npx, resolve the published CLI and run it with Node:

node $(node -e "const p=require.resolve('generic-mcp-search-fetch/package.json'); const {dirname,join}=require('path'); console.log(join(dirname(p),'dist/cli.js'));") --stdio

Cline Configuration

Add the server to cline_mcp_settings.json (macOS path: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):

{
  "mcpServers": {
    "search_fetch": {
      "timeout": 60,
      "type": "stdio",
      "command": "npx",
      "args": [
        "--yes",
        "--package",
        "[email protected]",
        "generic-mcp-search-fetch",
        "--stdio"
      ]
    }
  }
}

Customize the server key (search_fetch) or add autoApprove/env blocks as needed for your workflow.

ChatGPT Connector Setup

When adding this MCP server in ChatGPT → Settings → Connectors:

  • Command: node
  • Arguments: dist/server.js (or npm run dev for development)

Tools

search Tool

Searches through the data corpus and returns matching results.

Input:

{
  query: string,      // Search query
  limit?: number,     // Maximum results (default: 10, max: 50)
  cursor?: string     // Pagination cursor (optional)
}

Output:

{
  results: [{
    id: string,       // Unique identifier for fetching
    title: string,    // Human-readable title
    snippet?: string, // Preview snippet
    url?: string      // Source URL for citation
  }],
  nextCursor?: string | null // For pagination
}

fetch Tool

Retrieves complete document content by ID.

Input:

{
  id: string  // Document ID from search results
}

Output:

{
  id: string,           // Document ID
  title?: string,       // Document title
  content: string,      // Full document content
  url?: string,         // Source URL
  metadata?: object     // Additional metadata
}

Customization

Data Source

Replace the data in data/corpus.json with your own content. The file structure should be:

[
  {
    "id": "unique_id",
    "title": "Document Title",
    "url": "https://example.com/source",
    "content": "Full document content here..."
  }
]

Backend Integration

To connect to a different data source (database, API, etc.), modify the loadCorpus() function in src/server.ts and the search logic to match your backend.

Development

# Development with hot reload
npm run dev

# Build for production
npm run build

# Run production build
npm start

License

MIT License - Feel free to customize for your specific use case.