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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mew-mcp

v3.10.12

Published

Mew Control Protocol - A TypeScript client for the Mew API

Readme

Mew MCP - Cognitive Prosthetics for Claude

A sophisticated Model Context Protocol server that transforms Claude into a powerful cognitive partner for building and exploring knowledge graphs. This toolkit provides Claude with massive context loading, natural thinking capture, and intelligent knowledge navigation capabilities.

🧠 Cognitive Architecture

Mew MCP offers Claude a complete cognitive toolkit for human-AI knowledge collaboration:

🗺️ Structure & Navigation

  • viewTreeContext - Unified structure/content explorer with adaptive zoom levels and modes
  • moveNodes - Bulk reorganization tool for restructuring entire sections of your knowledge base

💭 Natural Thinking Capture

  • claudeThinkTree - Natural thinking in markdown with unlimited hierarchies and custom relationship connectors
    First insight about bottlenecks
      → evidence: Supporting data here
      → but: Important caveat
      breakthrough: Major realization
        actually: Correction to my thinking
    Second insight about coordination

🕸️ Semantic Web Building

  • createRelations - Create semantic connections between any nodes beyond hierarchical structure
  • bulkExpandForClaude - Foundation method providing massive context (2000+ nodes) for deep understanding

📊 Knowledge Space Access

  • getKnowledge - Access different knowledge spaces (global, claude, user) with scope parameter
  • getChildNodes / findNodeByText - Precise navigation and discovery
  • addNode / updateNode / deleteNode - Full CRUD operations

🚀 Quick Start

For Claude Desktop Users

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "Mew MCP": {
      "command": "npx",
      "args": ["-y", "mew-mcp@latest"],
      "env": {
        "CURRENT_USER_ID": "<your_user_id>",
        "BASE_URL": "https://mew-edge.ideaflow.app/api",
        "BASE_NODE_URL": "https://mew-edge.ideaflow.app/",
        "AUTH0_DOMAIN": "ideaflow-mew-dev.us.auth0.com",
        "AUTH0_CLIENT_ID": "<your_auth0_client_id>",
        "AUTH0_CLIENT_SECRET": "<your_auth0_client_secret>",
        "AUTH0_AUDIENCE": "https://ideaflow-mew-dev.us.auth0.com/api/v2/"
      }
    }
  }
}

Configuration locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

🛠️ Development

Local Setup

git clone https://github.com/IdeaflowCo/mew-mcp.git
cd mew-mcp
npm install

Environment Configuration

Create .env file:

cp .env.example .env

Configure your .env:

BASE_URL=https://your-mew-api.example.com/api
BASE_NODE_URL=https://your-mew-app.example.com/
AUTH0_DOMAIN=your-instance.auth0.com
AUTH0_CLIENT_ID=your_client_id
AUTH0_CLIENT_SECRET=your_client_secret
AUTH0_AUDIENCE=your_api_audience
CURRENT_USER_ID=your_user_id

Build & Run

npm run build
npm run start:mcp

🧩 Architecture Details

Massive Context Loading

The bulkExpandForClaude method uses aggressive BFS (Breadth-First Search) expansion with intelligent limits:

  • 12 levels deep maximum traversal
  • 200 nodes per level breadth limiting
  • 2000 total nodes safety cap
  • Cycle detection prevents infinite recursion
  • Graceful fallbacks ensure reliability

Adaptive Algorithms

Tools like viewTreeContext use context-aware strategies:

  • Global spaces: Prioritize breadth (wide but shallow)
  • User spaces: Balanced approach (moderate depth/breadth)
  • Specific nodes: Depth-first (narrow but deep)

Natural Thinking Parser

claudeThinkTree recognizes natural connectors:

  • → flows_to / → evidence: / → but:
  • breakthrough: / tentative: / critical:
  • actually: / hmm: / but wait:

🔧 Environment Variables

| Variable | Description | Required | |----------|-------------|----------| | CURRENT_USER_ID | User identifier for session context | ✅ | | BASE_URL | Mew API base URL | ✅ | | BASE_NODE_URL | Node web interface base URL | ✅ | | AUTH0_DOMAIN | Auth0 domain for authentication | ✅ | | AUTH0_CLIENT_ID | Auth0 client identifier | ✅ | | AUTH0_CLIENT_SECRET | Auth0 client secret | ✅ | | AUTH0_AUDIENCE | Auth0 API audience | ✅ |

🎯 Use Cases

For Researchers: Navigate vast literature graphs, connect ideas across domains, capture insights with natural relationship mapping.

For Writers: Build interconnected story worlds, track character relationships, organize research with semantic connections.

For Developers: Map codebase architectures, trace dependency relationships, document system knowledge with hierarchical thinking.

For Teams: Collaborative knowledge building, shared mental models, persistent institutional memory.

🔌 OpenAI Function Calling

Mew MCP now supports OpenAI function calling, allowing you to use all 9 tools with OpenAI's API:

import { createOpenAIAdapter } from 'mew-mcp/openai';

// Create adapter with your config
const adapter = createOpenAIAdapter(config, userId);

// Use with OpenAI
const completion = await openai.chat.completions.create({
  model: "gpt-4",
  messages: messages,
  tools: adapter.getFunctions().map(f => ({ type: 'function', function: f })),
  tool_choice: 'auto'
});

// Execute function calls
if (completion.choices[0].message.tool_calls) {
  for (const toolCall of completion.choices[0].message.tool_calls) {
    const result = await adapter.execute({
      name: toolCall.function.name,
      arguments: toolCall.function.arguments
    });
  }
}

All tools are available through the adapter with zero code duplication. See examples/openai-usage.ts for complete examples.

🔄 Version History

  • v3.8.12 - Added OpenAI function calling support
  • v1.1.45 - Complete cognitive toolkit with bulk operations
  • v1.1.44 - Added semantic relationship creation
  • v1.1.43 - Restored natural thinking and content preview tools
  • v1.1.42 - Removed deprecated tools, fixed protocol issues
  • v1.1.26 - Last stable version before feature development

🤝 Contributing

We welcome contributions! This project represents cutting-edge human-AI cognitive collaboration. Whether you're improving algorithms, adding new cognitive tools, or enhancing the thinking capture mechanisms, your contributions help push the boundaries of augmented intelligence.

📄 License

MIT License - see LICENSE.md for details.


Built for the future of human-AI cognitive partnership 🤖🧠