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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@pagopa/dx-mcpserver

v0.0.9

Published

An MCP server that support developers using DX tools.

Readme

@pagopa/dx-mcpserver

An MCP server that support developers using DX tools.

This package contains the implementation of a Model Context Protocol (MCP) server.

Features

The server currently exposes the following capabilities:

  • Tools:
    • QueryPagoPADXDocumentation: Queries Amazon Bedrock Knowledge Bases to retrieve relevant content from the DX documentation.
    • SearchGitHubCode: Searches for code snippets in specified GitHub organization (defaults to pagopa), allowing users to find real-world examples of code usage.
  • Prompts:
    • GenerateTerraformConfiguration: Guides the generation of Terraform configurations following PagoPA DX best practices.

Authentication

The server requires a fine-grained GitHub Personal Access Token for authentication with the following settings:

  • Resource owner:
    • Choose the pagopa organization
  • Repository access:
    • Public Repositories (read-only)
  • Organization permissions:
    • Members: Read-only (to verify membership in the pagopa organization)

Usage

This server can be used by any MCP-compliant client.

VS Code

Update your configuration file with the following. See VS Code MCP docs for more info. The GH PAT authentication is done via a prompt, so you will be asked to enter it the first time you use the server.

{
  "servers": {
    "dx-docs": {
      "url": "https://api.dx.pagopa.it/mcp",
      "type": "http",
      "headers": {
        "x-gh-pat": "${input:github_mcp_pat}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "github_mcp_pat",
      "description": "GitHub Personal Access Token",
      "password": true
    }
  ]
}

GitHub Copilot Coding Agent

You need to configure it in the repository settings. See GitHub Copilot MCP docs for more info.

  1. Declare the MCP Server: In the "Copilot" >> "Coding agent" panel of your repository settings, add an MCP Server declaration as follows:
{
  "mcpServers": {
    "pagopa-dx": {
      "url": "https://api.dx.pagopa.it/mcp",
      "type": "http",
      "tools": ["*"],
      "headers": {
        "x-gh-pat": "$COPILOT_MCP_BOT_GH_PAT"
      }
    }
  }
}
  1. Configure Authentication: Add any necessary tokens or secrets (e.g., COPILOT_MCP_BOT_GH_PAT) as secrets in the repository's Copilot configuration. This allows the coding agent to use them when querying the server.

Once configured, Copilot can autonomously invoke the MCP server's tools during task execution, using it to access documentation context and improve the quality of its code generation.

GitHub Copilot CLI

To use the MCP server with GitHub Copilot CLI, run the cli with copilot and prompt /mcp add to start the configuration of the MCP server

Follow the guided wizard to start using the DX MCP server:

  1. Server Name: dx-docs
  2. Server Type: 2 (HTTP)
  3. URL: https://api.dx.pagopa.it/mcp
  4. HTTP Headers: {"x-gh-pat": "<your-gh-PAT>"}
  5. Tools: * (leave as is)

Use Tab to navigate between fields and Ctrl+S to save.

Development

This is a standard TypeScript project. To get started:

pnpm install
pnpm --filter @pagopa/dx-mcpserver build

You can run the following scripts:

  • pnpm --filter @pagopa/dx-mcpserver lint: Lints the code.
  • pnpm --filter @pagopa/dx-mcpserver format: Formats the code.
  • pnpm --filter @pagopa/dx-mcpserver test: Runs tests.
  • pnpm --filter @pagopa/dx-mcpserver typecheck: Checks types.

Docker

To build the Docker container for this application, run the following command from the root of the monorepo:

docker build -t dx/mcp-server -f ./apps/mcpserver/Dockerfile .

Architecture

The architecture allows any Model Context Protocol (MCP) compliant client (such as GitHub Copilot) to query the PagoPA DX technical documentation in natural language, receiving contextualized and up-to-date answers.

  1. Content Upload: On each release of the documentation website, Markdown and text files (.md, .txt) are uploaded to an S3 bucket.
  2. Indexing: From there, the documents are processed by Amazon Bedrock Knowledge Bases, which handles the embedding and semantic indexing process.
  3. Vector Storage: The resulting embeddings are saved in a Vector Bucket (an S3-based vector database), enabling efficient and persistent semantic search.
  4. Query and Retrieval: When an MCP client sends a query, an AWS Lambda function implementing the MCP Server queries the Knowledge Base to retrieve the most relevant content and returns the response to the client.

This approach allows AI agents like Copilot to access the documentation context in a structured way, keeping the orchestration, storage, and semantic retrieval layers separate.