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

@2lab.ai/claude-mcp-server

v1.0.1

Published

MCP server for interacting with Anthropic's Claude CLI

Readme

Claude MCP Server

A Model Context Protocol (MCP) server that provides a bridge to Anthropic's Claude CLI. This allows MCP-compliant clients (like Claude Desktop or Gemini) to interact with the Claude CLI to start new chat sessions or continue existing ones.

Features

  • Start New Sessions: Initiate a new conversation with a specific Claude model.
  • Continue Sessions: Reply to existing sessions using their Session ID.
  • Session Management: Automatically continues the latest session if no Session ID is provided.
  • Model Selection: Supports specifying different Claude models (e.g., sonnet, opus, haiku).
  • System Prompt: Native support for custom system prompts.
  • Working Directory: Specify custom working directory for CLI execution.

Prerequisites

# Install Claude CLI
npm install -g @anthropic-ai/claude-code

# Authenticate
claude setup-token

Installation

Global Installation

npm install -g @2lab.ai/claude-mcp-server

Run directly with npx

npx @2lab.ai/claude-mcp-server

Usage

Running the server

After global installation:

claude-mcp-server

Or with npx:

npx @2lab.ai/claude-mcp-server

Testing with MCP Inspector

You can test and debug the server using the MCP Inspector:

npx @modelcontextprotocol/inspector npx @2lab.ai/claude-mcp-server

Or if globally installed:

npx @modelcontextprotocol/inspector claude-mcp-server

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "claude-cli": {
      "command": "npx",
      "args": ["-y", "@2lab.ai/claude-mcp-server"]
    }
  }
}

Or if globally installed:

{
  "mcpServers": {
    "claude-cli": {
      "command": "claude-mcp-server"
    }
  }
}

Claude Code Configuration

Add to your Claude Code settings:

{
  "mcpServers": {
    "claude-cli": {
      "command": "npx",
      "args": ["-y", "@2lab.ai/claude-mcp-server"]
    }
  }
}

Available Tools

chat

Start a new Claude session with a prompt.

Parameters:

  • prompt (required): The prompt to start the session with
  • model (optional): The model to use (e.g., 'sonnet', 'opus', 'haiku')
  • systemPrompt (optional): System prompt to set the assistant's behavior
  • cwd (optional): Working directory for the claude CLI execution

Returns: Response text and new Session ID in _meta.sessionId

chat-reply

Continue an existing Claude session.

Parameters:

  • prompt (required): The prompt to continue the conversation
  • sessionId (optional): The session ID to continue. If not provided, continues the most recent session
  • model (optional): The model to use for this turn
  • systemPrompt (optional): Additional system prompt to append for this turn
  • cwd (optional): Working directory for the claude CLI execution

Returns: Response text and Session ID in _meta.sessionId

Development

# Clone the repository
git clone https://github.com/2lab-ai/claude-mcp-server.git
cd claude-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run locally
npm start

# Test with MCP Inspector
npm run inspect

CI/CD

This project uses GitHub Actions to automatically publish to npm when changes are pushed to the main branch.

To enable automatic publishing:

  1. Generate an npm access token from npmjs.com
  2. Add the token as a secret named NPM_TOKEN in your GitHub repository settings
  3. Bump the version in package.json before pushing to trigger a publish

License

ISC