Generally, Massachusetts does not have jurisdiction until the child has been living there for a least 6 months.  There are exceptions; including if there is a present danger, the child’s safety or well being or the safeguard of the child, but generally 6 months.