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

graph.do

v0.1.0

Published

Knowledge graph built on mongo.do with MCP server support

Readme

graph.do

Knowledge graph database built on mongo.do with MCP server support.

Installation

npm install graph.do

Usage

import { graph } from 'graph.do'

// Create entities
await graph.createEntities([
  { name: 'Alice', entityType: 'Person', observations: ['Works at Acme', 'Lives in NYC'] },
  { name: 'Bob', entityType: 'Person', observations: ['Works at Acme', 'Manages Alice'] },
  { name: 'Acme', entityType: 'Company', observations: ['Tech startup', 'Founded 2020'] }
])

// Create relations
await graph.createRelations([
  { from: 'Alice', to: 'Acme', relationType: 'works_at' },
  { from: 'Bob', to: 'Acme', relationType: 'works_at' },
  { from: 'Bob', to: 'Alice', relationType: 'manages' }
])

// Search the graph
const results = await graph.searchNodes('Acme')

// Read the entire graph
const fullGraph = await graph.readGraph()

// Open specific nodes with their relations
const nodes = await graph.openNodes(['Alice', 'Bob'])

API

Entities

Entities are nodes in the knowledge graph with:

  • name - Unique identifier
  • entityType - Classification (Person, Company, etc.)
  • observations - Array of facts about the entity

Relations

Relations are directed edges between entities:

  • from - Source entity name
  • to - Target entity name
  • relationType - Type of relationship (in active voice)

Methods

| Method | Description | |--------|-------------| | createEntities(entities) | Create new entities (skips duplicates) | | createRelations(relations) | Create new relations (skips duplicates) | | addObservations(observations) | Add observations to existing entities | | deleteEntities(names) | Delete entities and their relations | | deleteObservations(deletions) | Remove specific observations | | deleteRelations(relations) | Remove specific relations | | readGraph() | Get the complete graph | | searchNodes(query) | Search by name, type, or observation | | openNodes(names) | Get specific entities with inter-relations |

MCP Server

graph.do includes a Model Context Protocol server for AI agent integration.

CLI (stdio transport)

# Uses https://graph.do by default
npx graph.do

# Or with custom URL
npx graph.do --url https://my-graph.workers.dev

Add to Claude Desktop config:

{
  "mcpServers": {
    "graph": {
      "command": "npx",
      "args": ["graph.do"]
    }
  }
}

HTTP Transport

Deploy to Cloudflare Workers for HTTP MCP access:

npm run deploy

Endpoints:

  • GET /mcp - Server info
  • GET /mcp/tools - List available tools
  • POST /mcp - JSON-RPC endpoint
  • POST /mcp/tools/:name - Direct tool calls

Custom Deployment

graph.do is self-contained - deploy your own instance:

git clone https://github.com/drivly/graph.do
cd graph.do
npm install
npm run deploy

Or use a custom URL programmatically:

import { createGraph } from 'graph.do'

const graph = createGraph('https://my-graph.workers.dev')

Architecture

graph.do is built on:

  • mongo.do - MongoDB-compatible database on Cloudflare Durable Objects
  • SQLite - Persistent storage via Durable Objects
  • MCP - Model Context Protocol for AI integration

Data is stored in two collections:

  • entities - Graph nodes
  • relations - Graph edges

License

MIT