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

@imazhar101/salesforce-mcp-jsforce

v0.3.0

Published

A lite, single-org Salesforce MCP server built on jsforce. Bring-your-own OAuth token — no credentials stored server-side. Runs over stdio (Claude Code) or as a dedicated streamable-HTTP server.

Readme

salesforce-mcp-jsforce

A lite, single-org Model Context Protocol server for Salesforce, built on jsforce.

  • Bring your own token. The server never stores a client secret, username, or password. You authenticate once with OAuth; it holds only an access token + instance URL.
  • Two ways to run. Locally over stdio (for Claude Code and other MCP clients) or as a dedicated streamable-HTTP server where each request carries its own token.
  • Safe to host & open-source. No org-specific config, no multi-environment credential matrix, no destructive metadata tooling. Optional read-only mode.

Tools

| Tool | Mode | Description | | --- | --- | --- | | salesforce_identity | read | Identity of the supplied token (token validity check) | | salesforce_query | read | Run a SOQL query | | salesforce_search | read | Run a SOSL full-text search | | salesforce_list_objects | read | List sObjects + key metadata | | salesforce_describe_object | read | Trimmed describe of an sObject | | salesforce_get_record | read | Retrieve a record by Id | | salesforce_create_record | write | Create a record | | salesforce_update_record | write | Update a record | | salesforce_delete_record | write | Delete a record |

Set SF_READONLY=1 to register the read tools only.

Quick start

npm install -g @imazhar101/salesforce-mcp-jsforce

# 1. Log in (PKCE against your External Client App)
salesforce-mcp-jsforce login --client-id <ECA_CONSUMER_KEY>
#   sandbox: add --login-url https://test.salesforce.com

# 2. Use it from Claude Code
claude mcp add salesforce -- npx -y @imazhar101/salesforce-mcp-jsforce

login opens a browser, completes the OAuth handshake, saves the token to ~/.config/salesforce-mcp-jsforce/token.json, and prints ready-to-paste config.

Credentials

stdio — one of:

  • SF_ACCESS_TOKEN + SF_INSTANCE_URL environment variables, or
  • the token file written by login (read automatically).

HTTP — per request, via headers:

  • X-SF-Access-Token
  • X-SF-Instance-Url
  • X-SF-Api-Version (optional)

Run as a dedicated HTTP server

PORT=3000 salesforce-mcp-jsforce http

Stateless streamable-HTTP at POST /mcp; health probe at GET /health. Each request is handled by a throwaway server instance keyed to its own token — no caller state is shared. Put it behind TLS; the access token is a live credential.

curl -s http://localhost:3000/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -H "X-SF-Access-Token: $SF_ACCESS_TOKEN" \
  -H "X-SF-Instance-Url: $SF_INSTANCE_URL" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Environment variables

| Var | Default | Purpose | | --- | --- | --- | | SF_ACCESS_TOKEN | — | stdio access token | | SF_INSTANCE_URL | — | stdio instance URL | | SF_API_VERSION | 62.0 | REST API version | | SF_READONLY | off | 1 strips write tools | | SF_LOGIN_URL | https://login.salesforce.com | OAuth host (sandbox: test.salesforce.com) | | SF_CLIENT_ID | — | ECA consumer key for login | | SF_CLIENT_SECRET | — | only for confidential apps | | SF_SCOPE | api refresh_token | OAuth scopes | | PORT | 3000 | HTTP host port |

Security model

  • The token grants exactly the permissions of the user who authorized it — the server adds no privilege.
  • In HTTP mode no credentials are persisted; the token lives only for the duration of one request.
  • In stdio mode the saved token file is written chmod 600.
  • Tokens are never logged.

Build from source

npm install
npm run build
node dist/index.js --help

License

MIT