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

xray-config-mcp

v1.0.0

Published

MCP server (Streamable HTTP + stdio) for generating Xray configs

Readme

Xray Config MCP

一个用于生成 Xray 配置的 MCP Server,支持两种传输方式:

  • Streamable HTTP
  • stdio

支持的工具

  • generate_shadowsocks_2022_psk
  • generate_shadowsocks_2022_config
  • generate_vless_preset_config
    • vless_tcp_reality_vision
    • vless_xhttp_reality
    • vless_encryption_tls

以上生成配置类工具会同时返回:

  • share_link:主共享链接
  • share_links:多个兼容变体(数组,含名称和链接)

Shadowsocks 2022 共享链接格式: ss://base64(method:ServerPassword:UserPassword)@address:port#remarksingle 模式为 method:password;默认 remarkxray-ss2022,可通过 remark 参数覆盖)

快速开始

cd mcp
npm install

1) HTTP 模式

启动:

npm start

默认地址:http://127.0.0.1:8787/mcp

可自定义:

npx xray-config-mcp --transport http --host 0.0.0.0 --port 8787 --path /mcp

客户端请求头建议:

  • Accept: application/json, text/event-stream
  • Content-Type: application/json(POST)

2) stdio 模式

启动:

npm run start:stdio

或:

npx xray-config-mcp --transport stdio

在 MCP 客户端中可按“命令启动”方式接入,例如:

{
  "command": "npx",
  "args": ["xray-config-mcp", "--transport", "stdio"]
}

调用示例

{
  "name": "generate_vless_preset_config",
  "arguments": {
    "preset": "vless_tcp_reality_vision",
    "server_host": "example.com",
    "server_port": 443,
    "uuid": "REPLACE_WITH_UUID",
    "reality_server_name": "www.cloudflare.com",
    "reality_dest": "www.cloudflare.com:443",
    "short_id": "a1b2c3d4"
  }
}

preset 改为 vless_xhttp_realityvless_encryption_tls 可生成其他模板。

说明

  • 对于 Reality 预设:
    • 若不传 reality_private_keyreality_public_key,会自动生成 X25519 密钥对。
    • 若手动传入,必须同时提供这两个字段。
  • 生成结果建议在实际部署前使用 xray run -test -config <path> 做校验。