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

sellagent-mcp-server

v1.3.1

Published

Model Context Protocol server for integrating LLM tools and services

Readme

SellAgent AI MCP Server

A Model Context Protocol (MCP) server that provides secure tools for interacting with SellAgent AI's CRM and sales automation platform.

Features

  • 🔐 Secure Authentication - Supports both API Keys and Bearer tokens
  • 📊 Lead Management - Get, create, update, and delete leads
  • 🚀 High Performance - Built-in caching for optimal performance
  • 🔌 Easy Integration - Works with any MCP-compatible client

Prerequisites

  • Node.js 16+ installed
  • A SellAgent AI account with API access
  • An MCP-compatible client (Claude Desktop, Continue.dev, etc.)

Installation

Option 1: Install from npm (Recommended)

# Install globally
npm install -g sellagent-mcp-server

# Or install locally in your project
npm install sellagent-mcp-server

Option 2: Clone and Install from Source

# Clone the repository
git clone https://github.com/sellagent/mcp-server.git
cd mcp-server

# Install dependencies
npm install

Configuration

Step 1: Configure Environment

Create a .env file in your working directory:

# Required: Your SellAgent API Key
SELLAGENT_API_KEY=your-api-key-here

# API Base URL
# For production (default):
SELLAGENT_BASE_URL=https://server.sellagent.ai/api
# For local development:
# SELLAGENT_BASE_URL=http://localhost:4005/api

# Optional: Authentication cache duration (milliseconds)
AUTH_CACHE_TTL=300000  # 5 minutes

Step 2: Get Your API Key

  1. Log in to SellAgent AI
  2. Navigate to Settings → API Keys
  3. Click Create New API Key
  4. Copy the key and add it to your .env file

Usage

Starting the Server

# If installed globally
sellagent-mcp-server

# If installed locally
npx sellagent-mcp-server

# Or using npm start (if cloned from source)
npm start

# The server will run on http://localhost:8080/sse

To test if everything is working:

# Run the test suite (source install only)
npm test

Client Configuration

Claude Desktop

  1. Find your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the SellAgent server configuration:

If installed globally:

{
  "mcpServers": {
    "sellagent": {
      "command": "sellagent-mcp-server",
      "env": {
        "SELLAGENT_API_KEY": "your-api-key-here",
        "SELLAGENT_BASE_URL": "https://server.sellagent.ai/api"
      }
    }
  }
}

If installed locally or from source:

{
  "mcpServers": {
    "sellagent": {
      "command": "node",
      "args": ["/absolute/path/to/mcp/index.js"],
      "env": {
        "SELLAGENT_API_KEY": "your-api-key-here",
        "SELLAGENT_BASE_URL": "https://server.sellagent.ai/api"
      }
    }
  }
}
  1. Restart Claude Desktop

  2. Verify by typing: "Can you get all leads from SellAgent?"

Continue.dev

  1. Open VS Code with Continue extension
  2. Open Continue settings (.continuerc.json)
  3. Add the MCP server:

If installed globally:

{
  "models": [...],
  "contextProviders": [{
    "name": "mcp",
    "params": {
      "servers": {
        "sellagent": {
          "command": "sellagent-mcp-server",
          "env": {
            "SELLAGENT_API_KEY": "your-api-key-here",
            "SELLAGENT_BASE_URL": "https://server.sellagent.ai/api"
          }
        }
      }
    }
  }]
}

If installed locally or from source:

{
  "models": [...],
  "contextProviders": [{
    "name": "mcp",
    "params": {
      "servers": {
        "sellagent": {
          "command": "node /absolute/path/to/mcp/index.js",
          "env": {
            "SELLAGENT_API_KEY": "your-api-key-here",
            "SELLAGENT_BASE_URL": "https://server.sellagent.ai/api"
          }
        }
      }
    }
  }]
}

Cody (Sourcegraph)

Add to your Cody configuration:

If installed globally:

{
  "mcp": {
    "servers": {
      "sellagent": {
        "command": "sellagent-mcp-server",
        "env": {
          "SELLAGENT_API_KEY": "your-api-key-here",
          "SELLAGENT_BASE_URL": "https://server.sellagent.ai/api"
        }
      }
    }
  }
}

If installed locally or from source:

{
  "mcp": {
    "servers": {
      "sellagent": {
        "command": "node",
        "args": ["/absolute/path/to/mcp/index.js"],
        "env": {
          "SELLAGENT_API_KEY": "your-api-key-here",
          "SELLAGENT_BASE_URL": "https://server.sellagent.ai/api"
        }
      }
    }
  }
}

Available Tools

sellagent_get_all_leads

Fetches all leads from your SellAgent workspace.

Basic Usage with API Key:

{
  "auth": {
    "type": "apiKey",
    "key": "your-api-key-here"
  }
}

With Parameters:

{
  "auth": {
    "type": "apiKey",
    "key": "your-api-key-here"
  },
  "limit": 10,
  "offset": 0,
  "workspaceId": "optional-workspace-id"
}

With Custom Authentication:

{
  "auth": {
    "type": "apiKey",
    "key": "different-api-key"
  },
  "limit": 5
}

Authentication Methods

Important: Authentication is required for every tool call. You must provide credentials with each request.

Method 1: API Key Authentication

Include your API key in the request:

{
  "auth": {
    "type": "apiKey",
    "key": "sk_live_different_key"
  }
}

Method 2: Bearer Token Authentication

For user-specific operations with JWT tokens:

{
  "auth": {
    "type": "bearer",
    "token": "eyJhbGciOiJIUzI1NiIs..."
  }
}

Troubleshooting

Common Issues

"Authentication failed"

  • Check API Key: Ensure it's correctly copied to .env
  • Verify Status: Check if the key is active in SellAgent dashboard
  • Test Directly: Run npm test to verify authentication

"Connection refused"

  • Local Server: Start your SellAgent server on port 4005
  • Use Production: Switch to https://server.sellagent.ai/api in .env
  • Check Network: Ensure you can reach the API server

"Rate limit exceeded"

  • Check Usage: View your API usage in SellAgent dashboard
  • Upgrade Plan: Consider upgrading for higher limits
  • Use Caching: The server caches auth for 5 minutes by default

Debug Mode

Enable detailed logging:

NODE_ENV=development npm start

Testing Authentication

Test your setup without a client:

# This will run authentication tests
npm test

Advanced Usage

Multiple Workspaces

To work with different workspaces:

{
  "workspaceId": "workspace-123",
  "auth": {
    "type": "apiKey",
    "key": "workspace-specific-key"
  }
}

Custom Base URL

For self-hosted SellAgent instances:

SELLAGENT_BASE_URL=https://your-domain.com/api

Proxy Configuration

If behind a corporate proxy:

export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080

Security Best Practices

  1. API Key Storage

    • Never commit .env files to version control
    • Use environment variables in production
    • Rotate keys regularly
  2. Network Security

    • Use HTTPS URLs in production
    • Restrict API key permissions in SellAgent
    • Monitor API usage for anomalies
  3. Client Security

    • Store keys in secure client configuration
    • Don't share configuration files
    • Use separate keys for each environment

Development

Project Structure

mcp/
├── auth/              # Authentication middleware
│   ├── middleware.js  # Request authentication
│   ├── service.js     # Token validation
│   └── httpClient.js  # Authenticated HTTP client
├── tools/             # MCP tools
│   └── sellagent/     # SellAgent-specific tools
│       └── leads.js   # Lead management
├── test/              # Test files
├── index.js           # Server entry point
└── .env              # Environment configuration

Adding New Tools

  1. Create a new file in tools/sellagent/
  2. Use the authentication middleware
  3. Register in tools/index.js
  4. Add tests in test/

Support

License

MIT License - See LICENSE file for details