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

cap-mcp-apps

v0.1.0

Published

CDS plugin that enriches @cap-js/mcp query tools with an MCP App UI5 table.

Readme

cap-mcp-apps

CDS plugin for CAP Node.js. It enriches @cap-js/mcp query tool results with an MCP App (UI5 Web Components table) when the host supports MCP Apps.

CAP loads it automatically. A consuming app only needs this package in dependencies. There is no server.js protocol override.

Install

npm add @cap-js/mcp cap-mcp-apps

From GitHub before it is published to npm:

{
  "dependencies": {
    "cap-mcp-apps": "github:aelghanam/mcp-apps"
  }
}

Annotate services with @mcp as usual. On cds watch / cds serve, CAP detects cds-plugin.js, merges this package's cds configuration, and loads the plugin.

The plugin contributes the annotation vocabulary in vocab/ through:

"cds": {
  "requires": {
    "cap-mcp-apps-vocab": {
      "model": "cap-mcp-apps/vocab"
    }
  }
}

Peer packages (@sap/cds, @cap-js/mcp, express) resolve from the consuming app. .npmrc sets omit=peer so a nested @sap/cds is not installed inside this package.

Configuration

Query-table enrichment is on by default. To keep the stock @cap-js/mcp adapter, set:

{
  "cds": {
    "mcp": {
      "apps": {
        "queryTable": false
      }
    }
  }
}

When queryTable is false, this plugin does not override protocols.mcp.impl.

Action buttons (@mcp.apps.Action)

Unbound service actions can be shown in the MCP App UI. The annotation shape is declared in vocab/index.cds (mcp.apps.Action / mcp.apps.Placement).

annotate MyService.ping with @mcp.apps.Action: {
  placement: #Toolbar,
  label: 'Ping'
};

annotate MyService.submitOrder with @mcp.apps.Action: {
  placement: #Row,
  label: 'Submit Order',
  entities: [Books, ListOfBooks]
};

| Field | CDL form | CSN | Meaning | |-------|----------|-----|---------| | placement | #Toolbar / #Row | { "#": "…" } | Below the table, or on each row | | label | string | string | Button text (defaults to the action name) | | entities | [Books, …] type refs | [{ "=": "Books" }, …] | Optional. Omit to show for every queried entity. |

Use type references [Books], not element expressions (Books). Parentheses are CXL paths resolved in the action scope and fail to compile for entity names.

Input forms are inferred from CDS parameters: no parameters calls immediately, scalars become inputs, structured or many parameters use a JSON textarea.

The App invokes the existing MCP call tool via app.callServerTool. After a successful action it re-runs the last query (structuredContent.queryArgs). A Refresh button in the header does the same.

Only actions the current MCP user may call (@requires / @restrict) are included.

Logging

const LOG = cds.log('cap-mcp-apps')
{
  "cds": {
    "log": {
      "[development]": {
        "levels": {
          "cap-mcp-apps": "debug"
        }
      }
    }
  }
}

Develop this plugin

src/ is the App UI. npm run build bundles it into assets/query-table.html, which the adapter serves at runtime. UI5 Web Components and esbuild are devDependencies of this package.

npm install
npm run build

Link it into a CAP app with "cap-mcp-apps": "file:../cap-mcp-apps", then run cds watch in that app.

License

PolyForm Small Business 1.0.0. Use is free for an individual, and for an organization with fewer than 100 people and under the license's revenue cap (1,000,000 USD in 2019 dollars, adjusted for inflation). Larger organizations are not covered and need a separate commercial license from the copyright holder.

The CDS annotation namespace stays mcp.apps (@mcp.apps.Action). That name is the annotation API, not the npm package name.