A knife-wielding man has been arrested at the electorate office of federal Labor MP Anne Aly, who says she and staff were left shaken.

The incident unfolded about 4pm on Monday at the member for Cowan's office in Perth's north, which is within a shopping centre.

Anne Aly said she and her staff were not in danger, but left shaken by the incident. Credit:Alex Ellinghausen

Staff separated from the man by security glass spoke with and kept him calm until police arrived.

Dr Aly said he did not make an outright threat but was brandishing "a fairly large kitchen knife".