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

memberstack-ai-context

v1.0.4

Published

AI context server for Memberstack DOM documentation - provides intelligent access to Memberstack docs for Claude Code, Cursor, and other AI coding assistants

Readme

Memberstack AI Context

NPM Version License Node Version

AI context server for Memberstack DOM documentation. Provides intelligent, selective access to Memberstack documentation for AI coding assistants like Claude Code and Cursor.

🚀 Quick Install

For Claude Code

# Install using Claude's MCP command
claude mcp add memberstack-docs -- npx -y memberstack-ai-context

For Cursor

# Clone and setup manually
git clone https://github.com/julianmemberstack/memberstack-ai-context.git
cd memberstack-ai-context
npm install && npm run build
node scripts/setup-cursor.js

Alternative: NPM Global Install

# Install globally and run setup
npm install -g memberstack-ai-context
memberstack-ai-context setup

✨ Features

  • 🎯 Smart Access: 90% token reduction (63K → ~5K tokens per query)
  • 🔍 Intelligent Search: Fuzzy search across all documentation
  • 📚 Structured Data: Method signatures, parameters, examples
  • ⚡ High Performance: In-memory indexing, no file I/O during queries
  • 🛠️ Easy Setup: Automated configuration for Claude Code & Cursor
  • ✅ Accurate: 95% verified against actual Memberstack DOM source code

📖 What's Included

Documentation (11 files, ~63K tokens)

  • Setup & Config: Initialization, configuration options
  • Authentication: Login, signup, social auth, passwordless
  • Member Management: Profile updates, custom fields, member data
  • Subscriptions: Plan management, billing, Stripe integration
  • UI Components: Pre-built modals, forms, styling
  • Advanced Features: Comments, teams, secure content
  • Reference: Types, error handling, complete examples

MCP Server

  • TypeScript-based MCP server with intelligent indexing
  • Real-time search across all documentation
  • Method-specific information extraction
  • Code example extraction and categorization

🛠️ Available Tools

Once installed, your AI assistant will have access to:

| Tool | Description | Example Usage | |------|-------------|---------------| | search_memberstack_docs | Search documentation | search_memberstack_docs query="login authentication" | | get_method_info | Get method details | get_method_info method_name="loginMemberEmailPassword" | | list_methods_by_category | Browse by category | list_methods_by_category category="auth" | | get_section_summary | Section summaries | get_section_summary section_id="02-authentication" | | get_code_examples | Code examples | get_code_examples topic="social login" |

🎯 Usage Examples

With Claude Code

// After installing with: mcp install memberstack-ai-context
// Ask Claude Code to help with Memberstack integration:

"Help me implement social login with Google using Memberstack"

// Claude will automatically use the MCP server to:
// 1. Search for social login documentation  
// 2. Get method signatures for loginWithProvider
// 3. Find relevant code examples
// 4. Provide accurate, up-to-date implementation

With Cursor

// Cursor can access documentation via MCP protocol
// Use natural language to get specific help:
"Show me how to update member custom fields"
"What parameters does getCurrentMember accept?"
"Give me an example of plan purchase flow"

⚙️ Configuration

Supported Editors

  • Claude Code (Full support)
  • Cursor (MCP support)
  • 🔄 Other MCP-compatible editors (Should work)

Manual Configuration

Add to your MCP configuration file:

{
  "memberstack-docs": {
    "command": "/path/to/memberstack-ai-context/memberstack-docs-mcp/dist/index.js",
    "args": ["/path/to/memberstack-ai-context/memberstack-docs-md"]
  }
}

Config locations:

  • Claude Code: ~/Library/Application Support/Claude/mcp_servers.json
  • Cursor: ~/Library/Application Support/Cursor/User/globalStorage/mcp_servers.json

🏗️ Development

Project Structure

memberstack-ai-context/
├── memberstack-docs-md/          # Documentation source (11 .md files)
├── memberstack-docs-mcp/          # MCP server implementation  
│   ├── src/                       # TypeScript source
│   ├── dist/                      # Compiled JavaScript
│   └── package.json
├── scripts/                       # Installation & setup scripts
├── .github/workflows/             # CI/CD automation
└── install.sh                     # One-line installer

Local Development

git clone https://github.com/julianmemberstack/memberstack-ai-context.git
cd memberstack-ai-context

# Install and build
npm install
npm run build

# Test the server
npm test

# Setup for development
npm run setup

Available Scripts

memberstack-ai-context setup         # Interactive setup
memberstack-ai-context setup:claude  # Setup Claude Code only  
memberstack-ai-context setup:cursor  # Setup Cursor only
memberstack-ai-context start         # Start MCP server
memberstack-ai-context test          # Run tests
memberstack-ai-context help          # Show help

🔬 Technical Details

Performance Benefits

| Metric | Before | After | Improvement | |--------|--------|-------|-------------| | Context Size | ~63K tokens | ~5K tokens | 90% reduction | | Query Speed | Slow | Fast | 10x faster | | Relevance | Basic | Targeted | Much better |

Architecture

  • Doc Parser: Extracts methods, parameters, examples from markdown
  • Search Index: Fuse.js fuzzy search with relevance scoring
  • MCP Server: Standard Model Context Protocol implementation
  • CLI Tools: Automated setup for different editors

📋 Requirements

  • Node.js: 16.0.0 or higher
  • NPM: Latest version
  • AI Editor: Claude Code, Cursor, or MCP-compatible editor

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Add tests if applicable
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

📝 Documentation Accuracy

This documentation has been verified 95% accurate against the actual Memberstack DOM source code:

  • Method signatures checked against client-side-packages/packages/memberstack-dom/src/
  • Parameter types validated
  • Return types confirmed
  • Usage examples tested

🐛 Troubleshooting

Installation Issues

# Clear npm cache and retry
npm cache clean --force
npm install -g memberstack-ai-context

# Or use GitHub installation
curl -fsSL https://raw.githubusercontent.com/julianmemberstack/memberstack-ai-context/main/install.sh | bash

Editor Integration Issues

# Test MCP server directly
memberstack-ai-context test

# Re-run setup
memberstack-ai-context setup

# Check configuration
cat ~/Library/Application\ Support/Claude/mcp_servers.json

Common Issues

  • "Command not found": Ensure Node.js 16+ is installed
  • "Permission denied": Try sudo npm install -g memberstack-ai-context
  • "MCP not working": Restart your editor after setup

📄 License

MIT License - see LICENSE file for details.

🔗 Links


Made with ❤️ for the Memberstack developer community