diff --git a/apps/mcast/cli/BUCK b/apps/mcast/cli/BUCK
new file mode 100644
index 0000000..df9991a
--- /dev/null
+++ b/apps/mcast/cli/BUCK
@@ -0,0 +1,16 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+    '//utils/rest:onlab-rest',
+    '//lib:javax.ws.rs-api',
+    '//utils/osgi:onlab-osgi',
+    '//core/store/serializers:onos-core-serializers',
+    '//apps/mcast/api:onos-apps-mcast-api'
+]
+
+
+osgi_jar_with_tests (
+    deps = COMPILE_DEPS,
+    import_packages = '*,org.onosproject.cli.net',
+)
diff --git a/apps/mcast/cli/pom.xml b/apps/mcast/cli/pom.xml
new file mode 100644
index 0000000..7af05c6
--- /dev/null
+++ b/apps/mcast/cli/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ Copyright 2018-present Open Networking Foundation
+~
+~ Licensed under the Apache License, Version 2.0 (the "License");
+~ you may not use this file except in compliance with the License.
+~ You may obtain a copy of the License at
+~
+~     http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing, software
+~ distributed under the License is distributed on an "AS IS" BASIS,
+~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~ See the License for the specific language governing permissions and
+~ limitations under the License.
+-->
+<project
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-app-mcast</artifactId>
+        <version>1.12.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>onos-app-mcast-cli</artifactId>
+    <packaging>bundle</packaging>
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-mcast-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-cli</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
new file mode 100644
index 0000000..6d872e8
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2016-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.mcast.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Deletes a multicast route.
+ */
+@Command(scope = "onos", name = "mcast-host-delete",
+        description = "Delete a multicast route flow")
+public class McastHostDeleteCommand extends AbstractShellCommand {
+
+    // Delete format for group line
+    private static final String D_FORMAT_MAPPING = "Deleted the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    // Update format for group line
+    private static final String U_FORMAT_MAPPING = "Updated the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    @Option(name = "-sAddr", aliases = "--sourceAddress",
+            description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
+            valueToShowInHelp = "1.1.1.1",
+            required = true, multiValued = false)
+    String sAddr = null;
+
+    @Option(name = "-gAddr", aliases = "--groupAddress",
+            description = "IP Address of the multicast group",
+            valueToShowInHelp = "224.0.0.0",
+            required = true, multiValued = false)
+    String gAddr = null;
+
+    @Option(name = "-h", aliases = "--host",
+            description = "Host sink format: MAC/VLAN",
+            valueToShowInHelp = "00:00:00:00:00:00/None")
+    String host = null;
+
+    @Option(name = "-cps", aliases = "--connectPoint",
+            description = "Egress port of:XXXXXXXXXX/XX",
+            valueToShowInHelp = "of:0000000000000001/1",
+            multiValued = true)
+    String[] egressList = null;
+
+
+    @Override
+    protected void execute() {
+        MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
+
+        if ("*".equals(sAddr) && "*".equals(gAddr)) {
+            // Clear all routes
+            mcastRouteManager.getRoutes().forEach(mcastRouteManager::remove);
+            return;
+        }
+        if (host != null && host.isEmpty()) {
+            print("Please provide a non-empty host Id");
+            return;
+        }
+        print("%s", host);
+        HostId hostId = HostId.hostId(host);
+        McastRoute mRoute = new McastRoute(IpAddress.valueOf(sAddr),
+                IpAddress.valueOf(gAddr), McastRoute.Type.STATIC);
+        if (!mcastRouteManager.getRoutes().contains(mRoute)) {
+            print("Route is not present, store it first");
+            print(U_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+            return;
+        }
+        if (host != null && egressList != null) {
+            Set<ConnectPoint> sinksSet = Arrays.stream(egressList)
+                    .map(ConnectPoint::deviceConnectPoint)
+                    .collect(Collectors.toSet());
+            mcastRouteManager.removeSinks(mRoute, hostId, sinksSet);
+        } else if (host != null) {
+            mcastRouteManager.removeSink(mRoute, hostId);
+        }
+        print(U_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+        print("%s", mcastRouteManager.routeData(mRoute));
+    }
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostJoinCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostJoinCommand.java
new file mode 100644
index 0000000..1391822
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostJoinCommand.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.mcast.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.McastRouteData;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Installs a source, multicast group flow.
+ */
+@Command(scope = "onos", name = "mcast-host-join",
+        description = "Installs a source, multicast group flow")
+public class McastHostJoinCommand extends AbstractShellCommand {
+
+    // Format for group line
+    private static final String FORMAT_MAPPING = "Added the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    @Option(name = "-sAddr", aliases = "--sourceAddress",
+            description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
+            valueToShowInHelp = "1.1.1.1",
+            required = true, multiValued = false)
+    String sAddr = null;
+
+    @Option(name = "-gAddr", aliases = "--groupAddress",
+            description = "IP Address of the multicast group",
+            valueToShowInHelp = "224.0.0.0",
+            required = true, multiValued = false)
+    String gAddr = null;
+
+    @Option(name = "-srcs", aliases = "--sources",
+            description = "Ingress port of:XXXXXXXXXX/XX",
+            valueToShowInHelp = "of:0000000000000001/1",
+            multiValued = true)
+    String[] sources = null;
+
+    @Option(name = "-sinks",
+            aliases = "--hostsinks",
+            description = "Host sink format: MAC/VLAN",
+            valueToShowInHelp = "00:00:00:00:00:00/None",
+            multiValued = true)
+    String[] hosts = null;
+
+    @Override
+    protected void execute() {
+        MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
+
+        IpAddress sAddrIp = null;
+        //If the source Ip is * we want ASM so we leave it as null and the route will have it as an optional.empty()
+        if (!sAddr.equals("*")) {
+            sAddrIp = IpAddress.valueOf(sAddr);
+        }
+
+        McastRoute mRoute = new McastRoute(sAddrIp, IpAddress.valueOf(gAddr), McastRoute.Type.STATIC);
+        log.info("Route {}", mRoute);
+        mcastRouteManager.add(mRoute);
+
+        if (sources != null) {
+            Set<ConnectPoint> sourcesSet = Arrays.stream(sources)
+                    .map(ConnectPoint::deviceConnectPoint)
+                    .collect(Collectors.toSet());
+            log.info("{}", sourcesSet);
+            mcastRouteManager.addSources(mRoute, sourcesSet);
+        }
+
+        if (hosts != null) {
+            for (String hostId : hosts) {
+                mcastRouteManager.addSink(mRoute, HostId.hostId(hostId));
+
+            }
+        }
+        printMcastRoute(mRoute);
+        printMcastRouteData(mcastRouteManager.routeData(mRoute));
+    }
+
+    private void printMcastRoute(McastRoute mcastRoute) {
+        print(FORMAT_MAPPING, mcastRoute.type(), mcastRoute.group(), mcastRoute.source());
+    }
+
+    private void printMcastRouteData(McastRouteData mcastRouteData) {
+        print("%s", mcastRouteData);
+    }
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastShowHostCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastShowHostCommand.java
new file mode 100644
index 0000000..562afad
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastShowHostCommand.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2016-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.mcast.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+
+import java.util.Comparator;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static com.google.common.base.Strings.isNullOrEmpty;
+
+/**
+ * Displays the source, multicast group flows entries.
+ */
+@Command(scope = "onos", name = "mcast-host-show", description = "Displays the source, multicast group flows")
+public class McastShowHostCommand extends AbstractShellCommand {
+
+    // Format for group line
+    private static final String FORMAT_MAPPING = "origin=%s, group=%s, source=%s, sinks=%s";
+
+    @Argument(index = 0, name = "mcastIp", description = "mcast Ip",
+            required = false, multiValued = false)
+    String mcastIp;
+
+    @Override
+    protected void execute() {
+        // Get the service
+        MulticastRouteService mcastService = get(MulticastRouteService.class);
+        // Get the routes
+        Set<McastRoute> routes = mcastService.getRoutes();
+        // Verify mcast group
+        if (!isNullOrEmpty(mcastIp)) {
+            // Let's find the group
+            IpAddress mcastGroup = IpAddress.valueOf(mcastIp);
+            McastRoute mcastRoute = routes.stream()
+                    .filter(route -> route.group().equals(mcastGroup))
+                    .findAny().orElse(null);
+            // If it exists
+            if (mcastRoute != null) {
+                // Get the sinks and print info
+                Set<ConnectPoint> sinks = mcastService.sinks(mcastRoute);
+                Set<ConnectPoint> sources = mcastService.sources(mcastRoute);
+                print(FORMAT_MAPPING, mcastRoute.type(), mcastRoute.group(),
+                        sources, sinks);
+            }
+            return;
+        }
+        // Filter ipv4
+        Set<McastRoute> ipv4Routes = routes.stream()
+                .filter(mcastRoute -> mcastRoute.group().isIp4())
+                .collect(Collectors.toSet());
+        // Print ipv4 first
+        ipv4Routes.stream()
+                .sorted(Comparator.comparing(McastRoute::group))
+                .forEach(route -> {
+                    // Get sinks
+                    Set<ConnectPoint> sinks = mcastService.sinks(route);
+                    Set<ConnectPoint> sources = mcastService.sources(route);
+                    print(FORMAT_MAPPING, route.type(), route.group(),
+                            sources, sinks);
+                });
+        // Filter ipv6
+        Set<McastRoute> ipv6Routes = routes.stream()
+                .filter(mcastRoute -> mcastRoute.group().isIp6())
+                .collect(Collectors.toSet());
+        // Then print ipv6
+        ipv6Routes.stream()
+                .sorted(Comparator.comparing(McastRoute::group))
+                .forEach(route -> {
+                    // Get sinks
+                    Set<ConnectPoint> sinks = mcastService.sinks(route);
+                    Set<ConnectPoint> sources = mcastService.sources(route);
+                    print(FORMAT_MAPPING, route.type(), route.group(),
+                            sources, sinks);
+                });
+    }
+
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastSourceDeleteCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastSourceDeleteCommand.java
new file mode 100644
index 0000000..d85e155
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastSourceDeleteCommand.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2016-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.mcast.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Deletes a multicast route.
+ */
+@Command(scope = "onos", name = "mcast-source-delete",
+        description = "Delete a multicast route flow")
+public class McastSourceDeleteCommand extends AbstractShellCommand {
+
+    // Delete format for group line
+    private static final String D_FORMAT_MAPPING = "Deleted the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    // Update format for group line
+    private static final String U_FORMAT_MAPPING = "Updated the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    @Option(name = "-sAddr", aliases = "--sourceAddress",
+            description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
+            valueToShowInHelp = "1.1.1.1",
+            required = true, multiValued = false)
+    String sAddr = null;
+
+    @Option(name = "-gAddr", aliases = "--groupAddress",
+            description = "IP Address of the multicast group",
+            valueToShowInHelp = "224.0.0.0",
+            required = true, multiValued = false)
+    String gAddr = null;
+
+    @Option(name = "-src", aliases = "--connectPoint",
+            description = "Source port of:XXXXXXXXXX/XX",
+            valueToShowInHelp = "of:0000000000000001/1",
+            multiValued = true)
+    String[] sourceList = null;
+
+
+    @Override
+    protected void execute() {
+        MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
+
+        if ("*".equals(sAddr) && "*".equals(gAddr)) {
+            // Clear all routes
+            mcastRouteManager.getRoutes().forEach(mcastRouteManager::remove);
+            return;
+        }
+
+        McastRoute mRoute = new McastRoute(IpAddress.valueOf(sAddr),
+                IpAddress.valueOf(gAddr), McastRoute.Type.STATIC);
+        if (!mcastRouteManager.getRoutes().contains(mRoute)) {
+            print("Route is not present, store it first");
+            print("origin=%s, group=%s, source=%s", mRoute.type(), mRoute.group(), mRoute.source());
+            return;
+        }
+        if (sourceList == null) {
+            mcastRouteManager.remove(mRoute);
+            print(D_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+            return;
+        }
+
+        Set<ConnectPoint> sourcesSet = Arrays.stream(sourceList)
+                .map(ConnectPoint::deviceConnectPoint)
+                .collect(Collectors.toSet());
+        mcastRouteManager.removeSources(mRoute, sourcesSet);
+        print(U_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+        print("%s", mcastRouteManager.routeData(mRoute));
+    }
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/package-info.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/package-info.java
new file mode 100644
index 0000000..7cedb77
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * CLI implementation for mcast.
+ */
+package org.onosproject.mcast.cli;
diff --git a/apps/mcast/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/mcast/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
new file mode 100644
index 0000000..7ab4273
--- /dev/null
+++ b/apps/mcast/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -0,0 +1,49 @@
+<!--
+~ Copyright 2018-present Open Networking Foundation
+~
+~ Licensed under the Apache License, Version 2.0 (the "License");
+~ you may not use this file except in compliance with the License.
+~ You may obtain a copy of the License at
+~
+~     http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing, software
+~ distributed under the License is distributed on an "AS IS" BASIS,
+~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~ See the License for the specific language governing permissions and
+~ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+
+        <command>
+            <action class="org.onosproject.mcast.cli.McastHostJoinCommand"/>
+            <optional-completers>
+                <entry key="-srcs" value-ref="deviceIdCompleter"/>
+                <entry key="-sinks" value-ref="hostIdCompleter"/>
+            </optional-completers>
+        </command>
+        <command>
+            <action class="org.onosproject.mcast.cli.McastShowHostCommand"/>
+        </command>
+        <command>
+            <action class="org.onosproject.mcast.cli.McastHostDeleteCommand"/>
+            <optional-completers>
+                <entry key="-cps" value-ref="deviceIdCompleter"/>
+                <entry key="-h" value-ref="hostIdCompleter"/>
+            </optional-completers>
+        </command>
+        <command>
+            <action class="org.onosproject.mcast.cli.McastSourceDeleteCommand"/>
+            <optional-completers>
+                <entry key="-src" value-ref="deviceIdCompleter"/>
+            </optional-completers>
+        </command>
+
+    </command-bundle>
+
+    <bean id="hostIdCompleter" class="org.onosproject.cli.net.HostIdCompleter"/>
+    <bean id="deviceIdCompleter" class="org.onosproject.cli.net.DeviceIdCompleter"/>
+
+</blueprint>
