Sponsored by Deepsite.site

Rehe

Created By
anthropics5 months ago
Content

Desktop Extensions (DXT)

Desktop Extensions (.dxt) are zip archives containing a local MCP server and a manifest.json that describes the server and its capabilities. The format is spiritually similar to Chrome extensions (.crx) or VS Code extensions (.vsix), enabling end users to install local MCP servers with a single click.

This repository provides three components: The extension specification in MANIFEST.md, a CLI tool for creating extensions (see CLI.md), and the code used by Claude for macOS and Windows to load and verify DXT extensions (src/index.ts).

  • For developers of local MCP servers, we aim to make distribution and installation of said servers convenient
  • For developers of apps supporting local MCP servers, we aim to make it easy to add support for DXT extensions

Claude for macOS and Windows uses the code in this repository to enable single-click installation of local MCP servers, including a number of end user-friendly features - such as automatic updates, easy configuration of MCP servers and the variables and parameters they need, and a curated directory. We are committed to the open ecosystem around MCP servers and believe that its ability to be universally adopted by multiple applications and services has benefits developers aiming to connect AI tools to other apps and services. Consequently, we’re open-sourcing the Desktop Extension specification, toolchain, and the schemas and key functions used by Claude for macOS and Windows to implement its own support of Desktop Extensions. It is our hope that the dxt format doesn’t just make local MCP servers more portable for Claude, but other AI desktop applications, too.

For Extension Developers

At the core, DXT are simple zip files containing your entire MCP server and a manifest.json. Consequently, turning a local MCP server into an extension is straightforward: You just have to put all your required files in a folder, create a manifest.json, and then create an archive.

To make this process easier, this package offers a CLI that helps you with the creation of both the manifest.json and the final .dxt file. To install it, run:

npm install -g @anthropic-ai/dxt
  1. In a folder containing your local MCP server, run dxt init. This command will guide you through the creation of a manifest.json.
  2. Run dxt pack to create a dxt file.
  3. Now, any app implementing support for DXT can run your local MCP server. As an example, open the file with Claude for macOS and Windows to show an installation dialog.

You can find the full spec for the manifest.json and all its mandatory and optional fields in MANIFEST.md. Examples for extensions can be found in examples.

Prompt Template for AI Tools

AI tools like Claude Code are particularly good at creating desktop extensions when informed about the spec. When prompting an AI coding tool to build an extension, briefly explain what your extension aims to do - then add the following context to your instructions.

I want to build this as a Desktop Extension, abbreviated as "DXT". Please follow these steps:

  1. Read the specifications thoroughly:
  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.

Directory Structures

Minimal Extension

A manifest.json is the only required file.

Example: Node.js Extension

extension.dxt (ZIP file)
├── 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
└── assets/               # Optional: Additional assets

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

Example: Binary Extension

extension.dxt (ZIP file)
├── manifest.json         # Required: Extension metadata and configuration
├── server/               # Server files
│   ├── my-server         # Unix executable
│   ├── my-server.exe     # Windows executable
└── icon.png              # Optional: Extension icon

Bundling Dependencies

Python Extensions:

  • Bundle all required packages in server/lib/ directory
  • OR bundle a complete virtual environment in server/venv/
  • Use tools like pip-tools, poetry, or pipenv to create reproducible bundles
  • Set PYTHONPATH to include bundled packages via mcp_config.env

Node.js Extensions:

  • Run npm install --production to create node_modules
  • Bundle the entire node_modules directory with your extension
  • Use npm ci or yarn install --frozen-lockfile for reproducible builds
  • Server entry point specified in manifest.json's server.entry_point

Binary Extensions:

  • Static linking preferred for maximum compatibility
  • Include all required shared libraries if dynamic linking used
  • Test on clean systems without development tools
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors