DXT File
Desktop Extension file format (.dxt) that packages MCP servers with dependencies and metadata into a single installable archive using ZIP compression.
DXT File
A DXT file is a ZIP archive with the .dxt
extension that contains a complete MCP server package. It includes the server code, all dependencies, configuration metadata, and optional assets like icons—everything needed for one-click installation.
File Structure
example.dxt (ZIP archive)
├── manifest.json # Required: Extension metadata
├── server/ # Server implementation
│ ├── index.js # Main entry point
│ └── utils.js # Supporting modules
├── node_modules/ # Bundled dependencies
├── package.json # Optional: Package definition
├── icon.png # Optional: Extension icon
└── assets/ # Optional: Additional resources
└── screenshots/ # Optional: Preview images
Manifest Structure
The manifest.json
is the only required file:
{
"dxt_version": "0.1",
"name": "my-extension",
"version": "1.0.0",
"description": "A simple MCP extension",
"author": {
"name": "Extension Author"
},
"server": {
"type": "node",
"entry_point": "server/index.js",
"mcp_config": {
"command": "node",
"args": ["${__dirname}/server/index.js"]
}
}
}
Server Types
Type | Entry Point | Use Case |
---|---|---|
node |
JavaScript/TypeScript file | Most common, uses bundled Node.js |
python |
Python script | Data processing, ML integrations |
binary |
Executable file | System utilities, compiled tools |
Template Variables
DXT files support runtime substitution:
Variable | Description | Example |
---|---|---|
${__dirname} |
Extension installation directory | /path/to/extension |
${user_config.key} |
User-provided configuration | API keys, paths |
${HOME} |
User home directory | /Users/username |
${TEMP} |
System temporary directory | /tmp |
Platform Support
Extensions can include platform-specific configurations:
{
"server": {
"mcp_config": {
"platforms": {
"win32": {
"command": "node.exe",
"env": {"TEMP_DIR": "${TEMP}"}
},
"darwin": {
"env": {"TEMP_DIR": "${TMPDIR}"}
}
}
}
}
}
Installation Process
- Download - User obtains .dxt file
- Import - Drag file into Claude Desktop Settings
- Validation - Host validates manifest and dependencies
- Configuration - User provides required settings
- Deployment - Extension unpacked and registered
- Activation - Server becomes available to LLM
Security Features
- Manifest Validation - Ensures proper structure and permissions
- Dependency Scanning - Checks for known vulnerabilities
- Sandboxed Execution - Servers run in isolated environments
- Permission System - Explicit user consent for sensitive operations
Development Tools
# Install DXT toolchain
npm install -g @anthropic-ai/dxt
# Initialize new extension
dxt init
# Validate manifest
dxt validate
# Package extension
dxt pack
File Format Benefits
Benefit | Description |
---|---|
Portability | Single file contains everything needed |
Versioning | Built-in version management and updates |
Compression | ZIP format reduces download size |
Metadata | Rich information for discovery and installation |
Validation | Checksum verification and integrity checks |
Related Terms
- Desktop Extensions for MCP
- MCP Server
- Host