Xray MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Xray MCP Server create a VLESS server with REALITY on port 443"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Xray MCP Server
A Model Context Protocol (MCP) server for generating Xray-core configurations using natural language. This server allows LLMs to create server and client configurations for various proxy protocols.
Features
Protocol Support: VLESS, VMess, Trojan, Shadowsocks
Transport Support: TCP, WebSocket, gRPC, XHTTP
Security Support: None, TLS, REALITY
Automatic Key Generation: UUID, X25519 key pairs, Short IDs, Passwords
Configuration Validation: Syntax and semantic validation
Example Configurations: Ready-to-use templates
Documentation: Built-in protocol, transport, and security documentation
Related MCP server: Mihomo MCP Server
Installation
npm install
npm run buildUsage with Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"xray-mcp": {
"command": "node",
"args": ["/path/to/xray-mcp/dist/index.js"]
}
}
}Available Tools
Configuration Generation
generate_server_config
Generate Xray server configuration with specified protocol, transport, and security options.
Example:
Generate a VLESS server with REALITY on port 443generate_client_config
Generate Xray client configuration for connecting to a proxy server.
Example:
Create a client config for VLESS+REALITY server at example.com:443Key Generation
generate_uuid
Generate a new UUID v4 for VLESS/VMess authentication.
generate_x25519_keypair
Generate X25519 key pair for REALITY (returns private and public keys).
generate_short_id
Generate a random short ID for REALITY authentication.
generate_password
Generate a random password for Trojan or Shadowsocks.
generate_ss2022_key
Generate a base64 key for Shadowsocks 2022.
Utilities
validate_config
Validate an Xray configuration for syntax and semantic errors.
list_protocols
List all supported proxy protocols with descriptions.
list_transports
List all supported transport types with descriptions.
list_security
List all supported security types with descriptions.
list_reality_targets
List recommended target sites for REALITY.
Available Resources
xray://docs/protocols- Protocol documentationxray://docs/transports- Transport documentationxray://docs/security- Security documentationxray://examples/server-vless-reality- VLESS+REALITY server examplexray://examples/client-vless-reality- VLESS+REALITY client examplexray://examples/server-vmess-ws-tls- VMess+WS+TLS server examplexray://examples/server-trojan-tls- Trojan+TLS server examplexray://examples/server-shadowsocks-2022- Shadowsocks 2022 server example
Example Conversations
Create a VLESS+REALITY Server
User: Create a VLESS server with REALITY on port 443, targeting microsoft.com
Assistant: (calls generate_server_config with appropriate parameters)
Create Matching Client Config
User: Generate a client config to connect to this server
Assistant: (calls generate_client_config with server details)
Generate Keys
User: Generate a new UUID and X25519 key pair for REALITY
Assistant: (calls generate_uuid and generate_x25519_keypair)
Supported Configurations
Protocols
Protocol | Description | Auth Type |
VLESS | Lightweight, supports XTLS Vision | UUID |
VMess | Classic V2Ray protocol | UUID |
Trojan | HTTPS-mimicking | Password |
Shadowsocks | Simple and fast | Password |
Transports
Transport | CDN Support | REALITY Support |
TCP | No | Yes |
WebSocket | Yes | No |
gRPC | Partial | Yes |
XHTTP | Yes | Yes |
Security
Security | Certificate Required | Description |
None | No | No encryption |
TLS | Yes | Standard TLS |
REALITY | No | Advanced camouflage |
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run devLicense
MIT
Available Tools
12 toolsgenerate_client_configB
Generate Xray client configuration for connecting to a proxy server.
Inputs: server_address (required), server_port (required), protocol (required), uuid, +15 more.
generate_passwordC
Generate a random password for Trojan or legacy Shadowsocks
Inputs: length.
generate_server_configC
Generate Xray server configuration. Supports VLESS, VMess, Trojan, and Shadowsocks protocols with various transport and security options.
Inputs: protocol (required), port (required), transport, security, +11 more.
generate_short_idB
Generate a random short ID for REALITY authentication
Inputs: length.
generate_ss2022_keyB
Generate a base64 key for Shadowsocks 2022
Inputs: cipher.
generate_uuidA
Generate a new UUID v4 for VLESS/VMess authentication
Inputs: no named parameters.
generate_x25519_keypairA
Generate X25519 key pair for REALITY. Returns base64url encoded private and public keys.
Inputs: no named parameters.
list_protocolsA
List all supported proxy protocols with descriptions
Inputs: no named parameters.
list_reality_targetsB
List recommended target sites for REALITY
Inputs: no named parameters.
list_securityB
List all supported security types with descriptions
Inputs: no named parameters.
list_transportsB
List all supported transport types with descriptions
Inputs: no named parameters.
validate_configC
Validate an Xray configuration for syntax and semantic errors
Inputs: config (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose with no overlap: configuration generation, password/key/UUID generation, protocol/security/transport listing, and validation. The descriptions clearly differentiate them, such as generate_client_config vs. generate_server_config, and list_protocols vs. list_transports vs. list_security.
All tools follow a consistent verb_noun pattern (e.g., generate_client_config, list_protocols, validate_config). The naming is uniform throughout, using snake_case and clear verbs like 'generate', 'list', and 'validate' without any deviations or mixed conventions.
With 12 tools, the count is well-scoped for an Xray configuration server, covering key areas like generation, listing, and validation. Each tool serves a specific function in the domain, and there are no extraneous or missing tools that would make the set feel too thin or bloated.
The tool set provides complete coverage for Xray configuration management: it includes generation tools for all necessary components (configs, passwords, IDs, keys), listing tools for protocols, transports, and security, and a validation tool. There are no obvious gaps, and agents can perform full configuration workflows without dead ends.
Related MCP Connectors
Free short-lived VLESS Reality and Hysteria 2 proxy credentials for compatible clients.
Buy and manage proxies from Claude, Cursor, and other AI clients.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
免费的代理客户端知识库:Clash、v2rayN、sing-box 等客户端的概念、教程与排错(中文,只读)
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables natural language control of Surge proxy, including toggling features, managing policies, requests, DNS, and device settings via the Surge HTTP API.192MIT
- AlicenseNot gradedqualityDmaintenance基于MCP协议的Mihomo/Clash Meta代理节点管理服务,允许AI助手自动管理代理节点、订阅、服务控制和内核版本。2MIT
- AlicenseAqualityCmaintenanceEnables LLM agents to read 3x-ui panel data and perform full CRUD operations on inbounds and clients.1214 npm1Apache 2.0

HProxy MCP serverofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to pull live free proxy lists filtered by country, protocol, and anonymity, run real liveness and anonymity checks against candidate proxies, and look up geolocation, ASN, and network details for public IP addresses. All tools are read-only and require no API key or installation.MIT