What is matter-mcp-server?

An MCP (Model-Context-Protocol) server that enables Claude and other AI assistants to directly interact with Matter devices and protocol operations. This server bridges the gap between AI language models and IoT device control by providing a structured interface for:

Benefits

By using matter-mcp-server, AI assistants can understand and control Matter devices through natural language, making complex IoT operations more accessible and intuitive. The server implements the FastMCP protocol, allowing seamless integration with Claude and other AI platforms that support MCP.

Key benefits:

What You'll Build

In this codelab, you will:

Prerequisites

You will need:

  1. Clone the repository:
git clone https://github.com/your-username/matter-mcp-server.git
cd matter-mcp-server
  1. Create and activate a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Install uv (required for Claude integration):
curl -LsSf https://astral.sh/uv/install.sh | sh

If your system doesn't have curl, use wget:

wget -qO- https://astral.sh/uv/install.sh | sh
  1. Locate your Claude configuration directory:
  1. Edit or create the claude_desktop_config.json file:
code ~/.config/Claude/claude_desktop_config.json  # Use your preferred editor
  1. Add the MCP Server configuration:
{
    "mcpServers": {
        "matter-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPLACE_WITH_FULL_PATH_TO_YOUR_REPO]",
                "run",
                "matter-mcp-server.py"
            ]
        }
    }
}

Note: Replace [REPLACE_WITH_FULL_PATH_TO_YOUR_REPO] with the actual path to your cloned repository.

  1. Save the file and restart Claude Desktop

If you're using Claude Code, follow these steps to add the MCP Server:

  1. Open a terminal and ensure you're in the matter-mcp-server directory
  2. Add the MCP Server to Claude Code:
claude mcp add matter-mcp-server uv --directory [FULL_PATH_TO_REPO] run matter-mcp-server.py
  1. Verify the installation:
claude mcp list

You should see "matter-mcp-server" in the list of available MCP servers.

To enhance Claude's capabilities, you can add these additional MCP servers to your configuration:

{
    "mcpServers": {
        "matter-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPLACE_WITH_FULL_PATH_TO_YOUR_REPO]",
                "run",
                "matter-mcp-server.py"
            ]
        },
        "matter-coder-search": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPLACE_WITH_FULL_PATH_TO_YOUR_REPO]",
                "run",
                "matter-coder-search.py"
            ]
        },
        "matter-datamodel-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPLACE_WITH_FULL_PATH_TO_YOUR_REPO]",
                "run",
                "matter-datamodel-mcp.py"
            ]
        }
    }    
}

Add these to your claude_desktop_config.json file and restart Claude Desktop for the changes to take effect.

If you encounter issues:

  1. Check that the virtual environment is activated
  2. Verify the paths in claude_desktop_config.json are correct
  3. Ensure all dependencies are installed correctly
  4. Try removing and re-adding the MCP server:
claude mcp remove matter-mcp-server
claude mcp add matter-mcp-server uv --directory [FULL_PATH_TO_REPO] run matter-mcp-server.py
  1. Check Claude Desktop logs for any error messages