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

@promptlayer/mcp-server

v1.0.0

Published

Model Context Protocol server for PromptLayer

Readme

PromptLayer MCP Server

MCP server that wraps the PromptLayer REST API, giving any MCP-compatible client access to all 33 PromptLayer tools.

Setup

npm install

Set your API key:

export PROMPTLAYER_API_KEY=pl_your_key_here

Or create a .env file (see .env.example).

Usage

With Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "promptlayer": {
      "command": "npx",
      "args": ["-y", "@promptlayer/mcp-server"],
      "env": {
        "PROMPTLAYER_API_KEY": "pl_your_key_here"
      }
    }
  }
}

With Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "promptlayer": {
      "command": "npx",
      "args": ["-y", "@promptlayer/mcp-server"],
      "env": {
        "PROMPTLAYER_API_KEY": "pl_your_key_here"
      }
    }
  }
}

From source

npm run build
node build/index.js

Tools

Prompt Templates

| Tool | Description | |---|---| | get-prompt-template | Get a template by name/ID with optional version or release label. Returns provider-formatted llm_kwargs. | | get-prompt-template-raw | Get raw template data without filling variables. For sync, caching, inspection. | | list-prompt-templates | List templates with pagination. Filter by name, label, status. | | publish-prompt-template | Create a new version of a template with content, metadata, and release labels. | | list-prompt-template-labels | List release labels on a template. | | create-prompt-label | Attach a release label to a template version. | | move-prompt-label | Move a label to a different version. | | delete-prompt-label | Delete a label. | | get-snippet-usage | Find all templates referencing a snippet. |

Tracking

| Tool | Description | |---|---| | log-request | Log an LLM request/response pair. Input/output in Prompt Blueprint format. | | track-prompt | Link a logged request to a prompt template. | | track-score | Score a logged request (0-100). Supports named scores. | | track-metadata | Attach metadata to a logged request. | | track-group | Associate a request with a group. | | create-spans-bulk | Create OpenTelemetry spans in bulk for tracing. |

Datasets

| Tool | Description | |---|---| | list-datasets | List datasets with filtering. | | create-dataset-group | Create a dataset group (container for versions). | | create-dataset-version-from-file | Create a version from base64 CSV/JSON. | | create-dataset-version-from-filter-params | Create a version from request log history. |

Evaluations

| Tool | Description | |---|---| | list-evaluations | List evaluation pipelines. | | create-report | Create an evaluation pipeline on a dataset. | | run-report | Execute a pipeline. | | get-report | Get pipeline details. | | get-report-score | Get the computed score. | | add-report-column | Add an evaluation step (one per request). | | update-report-score-card | Configure custom scoring logic. | | delete-reports-by-name | Archive pipelines by name. |

Agents

| Tool | Description | |---|---| | list-workflows | List all agents. | | create-workflow | Create an agent or new version. | | patch-workflow | Partially update an agent. | | run-workflow | Execute an agent by name. | | get-workflow-version-execution-results | Poll for execution results. |

Other

| Tool | Description | |---|---| | create-folder | Create a folder for organizing resources. |

Keeping in Sync

Schemas are verified against the PromptLayer OpenAPI spec. Run:

npm run sync:check

This fetches the spec, extracts our tool schemas, and diffs them structurally. Exit 0 = in sync. See TESTING.md for details.

Development

npm run dev       # Run with tsx (hot reload)
npm run build     # Compile TypeScript
npm run watch     # Watch mode

Project Structure

src/
  index.ts      # Entry point, starts MCP server
  types.ts      # Zod schemas + TOOL_DEFINITIONS for all 33 tools
  client.ts     # HTTP client for PromptLayer API
  handlers.ts   # Registers all tools with the MCP server
  utils.ts      # Shared utilities (query params, error handling, handler factory)
scripts/
  fetch-openapi-endpoints.ts   # Downloads + extracts OpenAPI spec
  extract-mcp-tools.ts         # Extracts MCP tool schemas for comparison
  diff-endpoints.ts            # Structural diff with known exceptions