Compounds of formula (I) wherein the symbols have meaning as defined herein, are p38 MAP kinase inhibitors, and are useful pharmaceutically for treating TNFα and IL-1 mediated diseases, such as rheumatoid arthritis, and diseases of bone metabolism, e.g. osteoporosis.