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

@xyd-js/mcp-server

v0.0.0-build-1202121-20260121231224

Published

MCP server for xyd

Readme

@xyd-js/mcp-server

HTTP MCP server for the xyd ecosystem. Serves Model Context Protocol endpoints over HTTP and wires tools/resources from a Uniform source (OpenAPI or GraphQL).

Powered by express and @modelcontextprotocol/sdk with support for the MCP Inspector.

Install

bun install

Usage

Build the server and run it, pointing to a Uniform source file. The server binds to PORT (default 3000).

# Build
bun run build

# Start (OpenAPI)
PORT=3000 bun run start ./demo/simple/openapi.json

# Or with GraphQL schema
# PORT=3000 bun run start ./path/to/schema.graphql

The server exposes:

  • POST /mcp — bidirectional MCP endpoint
  • GET /mcp and DELETE /mcp — session management via StreamableHTTPServerTransport

Pass a bearer token on the first POST /mcp initialize request to enable authenticated outgoing requests for generated tools:

Authorization: Bearer <your-api-token>

Inspector

You can attach the MCP Inspector to a running server instance:

npx @modelcontextprotocol/inspector http://localhost:3000/mcp

Demos

There is a small demo API under demo/simple and an accompanying OpenAPI document demo/simple/openapi.json you can use for local testing.

# Run demo API (separate terminal)
PORT=5050 bun demo/simple/server.ts

# Start MCP server using demo OpenAPI
PORT=3000 bun run start ./demo/simple/openapi.json

# Open MCP Inspector
npx @modelcontextprotocol/inspector http://localhost:3000/mcp

Programmatic

You can also import and run the server programmatically:

import { MCPServer } from "@xyd-js/mcp-server";

const server = new MCPServer();
// Optionally pass Uniform source as argv[2] when starting the process
// or customize the class to set `uniformSource`.

Endpoints and Behavior

  • Stores a session-specific bearer token on initialization and uses it for tool requests
  • Registers API reference resources and tools if uniformSource is provided
  • Cleans up transports and tokens on session close

Scripts

Useful package scripts:

  • bun run build — build to dist/
  • bun run dev — watch src/index.ts
  • bun run start — run compiled dist/index.js
  • bun run demo:simple — watch demo API server (port 5050)
  • bun run mcp:inspector — open MCP Inspector pointing at http://localhost:3000/mcp