# Desktop Extensions for MCP Desktop Extensions enable one-click installation for local [[Model Context Protocol (MCP)]] servers. It's an open specification (separate from MCP), accompanied by a toolchain (packaging & validation tools), a reference implementation, ... ## The problems Desktop Extensions solve Before Desktop Extensions became available, installing MCP servers locally was complicated when done manually using command-line tools, and somewhat simpler using GUI tools such as [[Dockmaster]]. But there were still major headaches to overcome for non-technical users, such as installing Node.js, Python and other runtimes, but also configuring MCP clients to recognize those servers. Here's an example: ``` # Install Node.js first npm install -g @example/mcp-server # Edit ~/.claude/claude_desktop_config.json manually # Restart Claude Desktop # Hope it works ``` Desktop Extensions solve that problem by providing an easy way to install local MCP servers. In addition, Desktop Extensions will also help discovery and understanding (cfr directory section of this note). ## What are Desktop Extensions Desktop Extensions are files with the `.dxt` extension. The bundle an entire MCP server, including all its dependencies into a single installable package. To install a local MCP server using Desktop Extensions, you just have to double-click on the `.dxt` file, and it will install & configure the MCP server for you (including its dependencies). ## Architecture ### Desktop Extension structure Desktop Extensions are zip archives containing the MCP server as well as a `manifest.json`file describing everything applications that support Desktop Extensions need to know. The Desktop Extensions specification is similar to Chrome extensions (.crx) files. Here are a few examples taken from the official documentation: ``` extension.dxt (ZIP archive) ├── manifest.json # Extension metadata and configuration ├── server/ # MCP server implementation │ └── [server files] ├── dependencies/ # All required packages/libraries └── icon.png # Optional: Extension icon # Example: Node.js Extension extension.dxt ├── manifest.json # Required: Extension metadata and configuration ├── server/ # Server files │ └── index.js # Main entry point ├── node_modules/ # Bundled dependencies ├── package.json # Optional: NPM package definition └── icon.png # Optional: Extension icon # Example: Python Extension extension.dxt (ZIP file) ├── manifest.json # Required: Extension metadata and configuration ├── server/ # Server files │ ├── main.py # Main entry point │ └── utils.py # Additional modules ├── lib/ # Bundled Python packages ├── requirements.txt # Optional: Python dependencies list └── icon.png # Optional: Extension icon ``` Note that the bare minimum is a `manifest.json`, file. ### Manifest contents The `manifest.json` file contains a JSON object with the following main fields: - dxt_version: version of the DXT specification - name - description - author (object) - Server configuration (object): The configuration of the server - type: "node", "python" or "binary" - entre_point: path to the entry point - mcp_config (object): MCP server configuration - command: the command to use to run the server - args (array): arguments to pass to the command Interestingly, the manifest specification enables fully describing the configuration options, the supported environment variables, the tools and prompts exposed by the server, the compatibility with MCP clients, platforms and runtimes, and more! For user configuration options (e.g., API keys, allowed directories, etc), the MCP client will: - Display a UI to let the user provide the information - Validate the user input - Store sensitive information securely (e.g., OS keychain) - Pass the configuration to the MCP server either as arguments or environment variables (depending on what the manifest mandates) The full list of currently supported fields is here: https://github.com/anthropics/dxt/blob/main/MANIFEST.md Example: ``` { "dxt_version": "0.1", // DXT spec version this manifest conforms to "name": "my-extension", // Machine-readable name (used for CLI, APIs) "version": "1.0.0", // Semantic version of your extension "description": "A simple MCP extension", // Brief description of what the extension does "author": { // Author information (required) "name": "Extension Author" // Author's name (required field) }, "server": { // Server configuration (required) "type": "node", // Server type: "node", "python", or "binary" "entry_point": "server/index.js", // Path to the main server file "mcp_config": { // MCP server configuration "command": "node", // Command to run the server "args": [ // Arguments passed to the command "${__dirname}/server/index.js" // ${__dirname} is replaced with the extension's directory ] } } } ``` ### Desktop Extensions Installation When an MCP client installs a Desktop Extension file, it handles: - The runtime installation - Automatic updates - Secure secrets: sensitive configuration like API keys are stored in the OS keychain On Windows, [[Claude]] Desktop stores information in two separate folders: - Desktop extensions are stored under: C:\Users\foo\AppData\Roaming\Claude\Claude Extensions - Desktop Extensions settings are stored under: C:\Users\foo\AppData\Roaming\Claude\Claude Extensions Settings ## Creating Desktop Extensions In the official repo, there's an interesting prompt one can use to more easily create such a file: ``` I want to build this as a Desktop Extension, abbreviated as "DXT". Please follow these steps: 1. **Read the specifications thoroughly:** - [https://github.com/anthropics/dxt/blob/main/README.md](https://github.com/anthropics/dxt/blob/main/README.md) - DXT architecture overview, capabilities, and integration patterns - [https://github.com/anthropics/dxt/blob/main/MANIFEST.md](https://github.com/anthropics/dxt/blob/main/MANIFEST.md) - Complete extension manifest structure and field definitions - [https://github.com/anthropics/dxt/tree/main/examples](https://github.com/anthropics/dxt/tree/main/examples) - Reference implementations including a "Hello World" example 2. **Create a proper extension structure:** - Generate a valid manifest.json following the MANIFEST.md spec - Implement an MCP server using @modelcontextprotocol/sdk with proper tool definitions - Include proper error handling, security measures, and timeout management 3. **Follow best development practices:** - Implement proper MCP protocol communication via stdio transport - Structure tools with clear schemas, validation, and consistent JSON responses - Make use of the fact that this extension will be running locally - Add appropriate logging and debugging capabilities - Include proper documentation and setup instructions 4. **Test considerations:** - Validate that all tool calls return properly structured responses - Verify manifest loads correctly and host integration works Generate complete, production-ready code that can be immediately tested. Focus on defensive programming, clear error messages, and following the exact DXT specifications to ensure compatibility with the ecosystem. ``` Alternatively, there's also an npm package to help create a manifest for an existing MCP server: `npx @anthropic-ai/dxt init`. The same npm package also enables validating the manifest and bundling the content of the folder containing said manifest to a `.dxt` file: `npx @anthropic-ai/dxt pack`. ## Cross-platform support Extensions can adapt to different operating systems, and the configuration can be dynamic. The manifest may define specific commands & environment variables for specific platforms. Also, there are different variables enabling dynamic configuration: - `${__dirname}`: the extension's installation folder - `${user_config.key}`: user-provided configuration - `${HOME}`, `${TEMP}`: system environment variables ## Tips & Tricks Desktop Extensions files can be dropped into the Claude Desktop Settings (Settings > Extensions) window to install it: ![[Desktop Extensions for MCP - installing desktop extensions.png]] ## Extension Directory Anthropic is launching an extensions directory. Coming soon... ## Drawbacks/Limitations Share my initial thoughts here: https://x.com/dSebastien/status/1938694868639064431 In addition... Security-wise, Desktop Extensions introduce new risks to consider: - Downloading/installing Desktop Extensions will be easy (it's the entire point) and since those install servers locally with full control over your computer (there's NO sandboxing), it's REALLY DANGEROUS... You've been warned 😂 - Desktop Extensions are updated automatically. Even if you trust the author when you install (doubtful since most people won't even look at the code), a future update might introduce security vulnerabilities or viruses (e.g., extension taken over by a malicious party) - Desktop Extensions that go unmaintained will maintain be more and more problematic once installed. You may end up installing outdated software full of vulnerabilities - ... ## Enterprise security Interestingly, Anthropic included some security measures for organizations (I suppose in Claude Desktop): - Group Policy control for Windows environments - Ability to pre-install approved extensions (similar to browser extensions control) - Ability to block certain extensions or publishers - Ability to disable the extension directory entirely - Ability to deploy private extension directories Documentation: https://support.anthropic.com/en/articles/10949351-getting-started-with-model-context-protocol-mcp-on-claude-for-desktop#h_dbdb834b36 ## References - Documentation: https://www.anthropic.com/engineering/desktop-extensions - Source code and specification: https://github.com/anthropics/dxt/tree/main - Currently supported `manifest.json` fields is here: https://github.com/anthropics/dxt/blob/main/MANIFEST.md - Examples: https://github.com/anthropics/dxt/tree/main/examples - Spec issues: https://github.com/anthropics/dxt/tree/main/examples - Submitting extensions to the Anthropic directory: https://docs.google.com/forms/d/e/1FAIpQLScHtjkiCNjpqnWtFLIQStChXlvVcvX8NPXkMfjtYPDPymgang/viewform - Enterprise security controls for DXT: https://support.anthropic.com/en/articles/10949351-getting-started-with-model-context-protocol-mcp-on-claude-for-desktop#h_dbdb834b36