# MCP Server Market: How to Discover and Contribute MCP Servers in ChatMCP

> Discover and contribute to the MCP Server Market, a community registry for ChatMCP. Learn how to submit your MCP server by creating a pull request to the mcp_server_market repository.

- Repository: [刀刀/chatmcp](https://github.com/daodao97/chatmcp)
- Tags: how-to-guide
- Published: 2026-02-28

---

**The MCP Server Market is a community-driven registry that ChatMCP queries at runtime to populate its server catalog, and you can contribute by submitting a pull request to the `chatmcpclient/mcp_server_market` repository with your server's JSON configuration.**

The MCP Server Market serves as the central discovery mechanism for ChatMCP (daodao97/chatmcp), a Flutter-based client for the Model Context Protocol (MCP). It enables users to browse and install third-party servers without updating the application, while allowing developers to distribute their tools through a simple JSON registry.

## What Is the MCP Server Market?

The **MCP Server Market** is a community-curated collection of MCP server definitions hosted in a separate repository at `chatmcpclient/mcp_server_market`. Unlike static application bundles, ChatMCP fetches this registry dynamically at runtime, merging it with your locally installed servers to present a unified catalog in the **MCP Server** settings page.

The market registry is a single JSON file ([`mcp_server_market.json`](https://github.com/daodao97/chatmcp/blob/main/mcp_server_market.json)) hosted on GitHub. When users open the server management interface, ChatMCP performs an HTTP GET request to fetch the latest market data, filters entries by platform compatibility, and annotates each entry with an `installed` flag to indicate whether it's already present in the local configuration.

## How ChatMCP Loads and Merges Market Data

The integration logic resides in `lib/provider/mcp_server_provider.dart`, specifically within the `loadMarketServers()` method. At lines 92-94, the provider fetches the canonical market file:

```dart
final response = await http.get(Uri.parse(
    'https://raw.githubusercontent.com/chatmcpclient/mcp_server_market/refs/heads/main/mcp_server_market.json'));

```

After retrieving the JSON, the provider parses the `mcpServers` map and performs platform-specific filtering (lines 19-25). Each server entry is checked against the current platform, and an `installed` boolean is injected to mark servers that already exist in the user's local [`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json) file. This merged dataset powers the UI in `lib/page/setting/mcp_server.dart`, where users can toggle servers on and off or initiate new installations.

### Local vs. Market Server Storage

ChatMCP maintains two distinct data layers:

- **[`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json)**: Stores user-specific server configurations locally, including custom servers not present in the market.
- **Remote market JSON**: The read-only registry fetched from GitHub that provides the canonical list of community servers.

The `McpServerProvider` class orchestrates this dual-source architecture, ensuring that locally defined servers take precedence while market servers fill out the catalog.

## Contributing a New MCP Server to the Market

You can add your MCP server to the global registry without modifying the ChatMCP application code. The market is data-driven, accepting contributions through standard GitHub workflows.

### Step 1: Fork the Market Repository

Navigate to `https://github.com/chatmcpclient/mcp_server_market` and create a fork. This repository contains the single source of truth for the market registry.

### Step 2: Add Your Server Definition

Edit the [`mcp_server_market.json`](https://github.com/daodao97/chatmcp/blob/main/mcp_server_market.json) file in your fork. Add a new entry under the `mcpServers` top-level object following this structure (reproduced from the ChatMCP README at lines 15-27):

```json
{
  "mcpServers": {
    "existing-mcp-servers": {},
    "my-awesome-server": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/username/my-awesome-server",
        "my-awesome-server"
      ]
    }
  }
}

```

Required fields include `command` (the executable to run), while `args`, `env`, and `tools` are optional depending on your server's requirements.

### Step 3: Submit a Pull Request

Commit your changes and open a pull request against the upstream `chatmcpclient/mcp_server_market` repository. Once merged, your server definition becomes immediately available to all ChatMCP clients, which fetch the updated JSON on their next market refresh.

## Programmatic Market Interaction

For developers extending ChatMCP or building automation around MCP servers, the `McpServerProvider` exposes methods to interact with the market programmatically.

### Loading the Market List

To fetch the current market catalog in Dart:

```dart
final provider = McpServerProvider();
final market = await provider.loadMarketServers();
print(market['mcpServers'].keys);  // Lists all available server names

```

This corresponds to the implementation at lines 94-115 of `mcp_server_provider.dart`.

### Adding a Server Programmatically

To inject a new server definition into the local configuration:

```dart
await provider.addMcpServer({
  'name': 'my-awesome-server',
  'type': 'custom',
  'command': 'uvx',
  'args': ['--from', 'git+https://github.com/username/my-awesome-server', 'my-awesome-server'],
  'env': {},
  'tools': []
});

```

The `addMcpServer()` method (lines 71-79) persists the configuration to [`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json) and initializes the client connection.

### Starting a Server Instance

Once added, activate a specific server:

```dart
await provider.startMcpServer('my-awesome-server');

```

Behind the scenes, `startMcpServer` invokes `initializeMcpServer` (lines 37-51), which spawns the process, loads available tools via the MCP protocol, and registers the client for use in chat sessions.

## Key Implementation Files

The market integration spans these critical files in the `daodao97/chatmcp` repository:

- **`lib/provider/mcp_server_provider.dart`**: Core provider handling market fetching, local storage, and client lifecycle management.
- **[`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json)**: Default local configuration file shipped with the application.
- **`lib/page/setting/mcp_server.dart`**: UI page rendering the server list and handling user installation requests.
- **`lib/page/layout/widgets/mcp_tools.dart`**: Toolbar widget providing quick access to MCP server management.
- **[`README.md`](https://github.com/daodao97/chatmcp/blob/main/README.md)**: User-facing documentation describing the contribution workflow.

## Summary

- The **MCP Server Market** is a remote JSON registry at `chatmcpclient/mcp_server_market` that ChatMCP fetches at runtime to discover available servers.
- `McpServerProvider.loadMarketServers()` merges remote market data with local [`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json), filtering by platform and marking installed servers.
- Contributing requires only editing [`mcp_server_market.json`](https://github.com/daodao97/chatmcp/blob/main/mcp_server_market.json) in the market repository and submitting a pull request—no ChatMCP code changes necessary.
- New servers appear automatically once the PR merges, as clients download the updated JSON on their next fetch cycle.
- Programmatic control is available through `addMcpServer()` and `startMcpServer()` methods in the provider class.

## Frequently Asked Questions

### Do I need to modify the ChatMCP Flutter code to add my server to the market?

No. The market is entirely data-driven. You only need to submit a pull request to the `chatmcpclient/mcp_server_market` repository with your server's JSON definition. ChatMCP reads this registry at runtime, so updates appear automatically without app redeployment.

### What fields are required in the market JSON entry?

At minimum, you must provide a `command` field specifying the executable to run. Most entries also include an `args` array for command-line arguments. Optional fields include `env` for environment variables and `tools` for pre-declared tool metadata. The exact schema mirrors the structure used in [`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json).

### How quickly will my contributed server appear in ChatMCP?

Immediately after your pull request is merged into the `main` branch of `chatmcpclient/mcp_server_market`. ChatMCP clients fetch [`mcp_server_market.json`](https://github.com/daodao97/chatmcp/blob/main/mcp_server_market.json) directly from the raw GitHub URL on each app launch or refresh, ensuring zero latency between merge and availability.

### Can I distribute private or internal MCP servers through the market?

The public market at `chatmcpclient/mcp_server_market` is intended for open-source community servers. For private distributions, users should add servers directly to their local [`assets/mcp_server.json`](https://github.com/daodao97/chatmcp/blob/main/assets/mcp_server.json) file through the ChatMCP **Add Server** dialog, or fork the market repository for internal use with a custom build pointing to your private JSON endpoint.