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

@ebowwa/mcp-state

v1.0.1

Published

MCP server for state management using @ebowwa/state core library

Downloads

27

Readme

@ebowwa/state-mcp

MCP server for state management using @ebowwa/state core library.

Overview

@ebowwa/state-mcp is a Model Context Protocol (MCP) server that provides persistent state management for AI coding assistants like Claude. Built on the @ebowwa/state core library with SQLite persistence.

Key Features

  • Core Library: Uses @ebowwa/state for all state management logic
  • Repository Pattern: Clean data access layer with SQLite backend
  • Token-Aware Responses: Automatic response sizing to stay within MCP protocol limits
  • Privacy Controls: Private state items that don't leak across sessions
  • TypeScript: Full type safety throughout

Architecture

This MCP server is a thin wrapper around @ebowwa/state:

@ebowwa/state-mcp/
├── src/
│   ├── tools/          # MCP tool definitions & handlers
│   │   ├── definitions.ts  # Tool schemas
│   │   └── handlers.ts     # Tool implementations
│   ├── transports/     # MCP transport implementations
│   │   └── stdio.ts    # Stdio transport (Claude Desktop)
│   ├── index.ts        # Main entry point
│   └── cli.ts          # CLI entry point
└── package.json        # Depends on @ebowwa/state

Core logic is in @ebowwa/state:

  • @ebowwa/state/core - Types, interfaces, errors
  • @ebowwa/state/repositories - SQLite repositories
  • @ebowwa/state/services - StateService business logic

Installation

# Install globally
npm install -g @ebowwa/state-mcp

# Or use with npx
npx @ebowwa/state-mcp

Usage with Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "state": {
      "command": "npx",
      "args": ["-y", "@ebowwa/state-mcp"],
      "env": {
        "MCP_DB_PATH": "/path/to/state.db"
      }
    }
  }
}

Available Tools

| Tool | Description | |------|-------------| | state_save | Save or update a state item | | state_get | Get a state item by key | | state_query | Query state items with filters | | state_search | Search state items by text | | state_delete | Delete a state item | | state_list_keys | List all state keys | | session_info | Get current session info | | session_set | Switch to a different session | | session_list | List all sessions |

Tool Examples

// Save a state item
await mcp.call('state_save', {
  key: 'project:context',
  value: 'This is a React project with TypeScript',
  category: 'project',
  priority: 'high'
});

// Get a state item
await mcp.call('state_get', { key: 'project:context' });

// Query with filters
await mcp.call('state_query', {
  category: 'project',
  limit: 50
});

// Search
await mcp.call('state_search', {
  query: 'React',
  searchIn: ['key', 'value']
});

Configuration

Environment variables:

| Variable | Description | Default | |----------|-------------|---------| | MCP_DB_PATH | Path to SQLite database | ./state-mcp.db | | MCP_MAX_TOKENS | Maximum response tokens | 25000 | | MCP_TOKEN_SAFETY_BUFFER | Safety buffer (0-1) | 0.8 | | MCP_MIN_ITEMS | Minimum items to return | 1 | | MCP_MAX_ITEMS | Maximum items to return | 100 | | MCP_CHARS_PER_TOKEN | Char-to-token ratio | 3.5 | | LOG_LEVEL | Logging level | INFO |

Development

# Install dependencies
bun install

# Build
bun run build

# Run
bun run start

Related Packages

License

MIT