Add Claude Code Plugin / Marketplace

View original issue on GitHub  ·  Variant 3

Integrating MCP Server with Claude Code via Plugin Marketplace

This article explores the process of integrating the MCP (presumably "My Custom Plugin") server with Claude Code, Anthropic's IDE, through its plugin system. The goal is to enable easier distribution and installation of MCP server for Claude Code users. This approach leverages Claude Code's plugin architecture to expose the MCP server's functionalities directly within the Claude Code environment.

The Problem: Discoverability and Installation

Currently, users likely need to manually install and configure the MCP server, a process that can be complex and time-consuming. Integrating with the Claude Code plugin marketplace streamlines this process, making the MCP server easily discoverable and installable. This significantly improves the user experience and encourages wider adoption.

Root Cause: Lack of Plugin Manifest

The primary reason the MCP server isn't readily available within Claude Code is the absence of a plugin manifest file, specifically a marketplace.json file. This file acts as a descriptor, providing Claude Code with essential information about the plugin, such as its name, description, installation instructions, and dependencies. Without this manifest, Claude Code has no way of identifying and installing the MCP server as a plugin.

Solution: Creating and Deploying marketplace.json

The solution involves creating a marketplace.json file within the MCP server's repository, following the format expected by Claude Code. This file should be placed in a designated directory, typically .claude-plugin/. Here's an example structure and content:


.claude-plugin/
├── marketplace.json

{
  "name": "MCP Server",
  "description": "My Custom Plugin Server for Claude Code.",
  "version": "1.0.0",
  "author": "Your Name",
  "url": "https://your-mcp-server-website.com",
  "install": {
    "type": "docker",
    "image": "your-docker-image:latest",
    "command": "docker run -p 8000:8000 your-docker-image:latest"
  },
  "categories": ["utilities", "development"]
}

Explanation of fields:

After creating the marketplace.json file and committing it to your repository, the next step is to add your repository to the Claude Code marketplace index. This typically involves submitting a pull request to a central repository (e.g., https://github.com/joesaunderson/claude-code-marketplace) that maintains a list of available plugins. This pull request adds an entry to the marketplaces.json file in that repository, pointing to your repository's marketplace.json file.

Practical Tips and Considerations

By following these steps, you can successfully integrate your MCP server with Claude Code's plugin ecosystem, making it more accessible and user-friendly for Claude Code developers.