access_time40 mins remaining

How to Install Matter MCP Server in Claude

access_time40 mins remaining

1. Introduction

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:

  • Device commissioning and management
  • Reading and writing device attributes
  • Sending commands to Matter devices
  • Monitoring device events and status
  • Searching Matter protocol documentation
  • Accessing Matter data models

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:

  • Direct AI control of Matter devices without complex coding
  • Natural language interface for Matter protocol operations
  • Real-time device monitoring and control
  • Structured access to Matter documentation and data models

2. Overview

What You'll Build

In this codelab, you will:

  • Set up a Python virtual environment for the Matter MCP Server
  • Install and configure the Matter MCP Server
  • Configure Claude Desktop to use the MCP Server
  • Add the MCP Server to Claude Code

Prerequisites

You will need:

  • Python 3.13 or later
  • Claude Desktop installed
  • Claude Code installed (optional)
  • Git installed
  • Basic knowledge of terminal commands

3. Installing the Matter MCP Server

  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

4. Configuring Claude Desktop

  1. Locate your Claude configuration directory:
  • Ubuntu: ~/.config/Claude
  • MacOS: ~/Library/Application Support/Claude
  • Windows: %APPDATA%\Claude
  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

5. Adding MCP Server to Claude Code

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.

6. Optional: Adding Additional 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.

7. Troubleshooting

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