Mark 12:30 is a quotation of Deut. 6:4–5 in the O.T. The verb ἀγαπήσεις is conjugated in the 2nd person, future tense, indicative mood from the lemma ἀγαπῶ (ἀγαπάω). The Greek grammars are unanimous in stating that the verb conjugated in the future tense, indicative mood can be be used as an imperative, especially in the N.T. citations of the O.T. legal texts.
Blass:1

Buttmann:2

Crosby:3

Goodwin:4

Kühner:5

Matthiae:6

Simonson:7

Winer:8

Footnotes
1 Blass, p. 209, §64.3
2 Buttmann, p. 257, §139
3 Crosby, p. 295, §597
4 Goodwin, p. 19, §69
5 Kühner, p. 70, §406.4
6 Matthiae, p. 837, §498
7 Simonson, p. 192, §1923
8 Winer, p. 396–397, Sec. XLIII, 5., c.
References
Blass, Friedrich Wilhelm. Grammar of New Testament Greek. Trans. Thackeray, Henry St. John. 2nd ed. London: Macmillan, 1905.
Buttmann, Alexander. A Grammar of the New Testament Greek. Trans. Thayer, Joseph Henry. Andover: Draper, 1873.
Crosby, Alpheus. A Compendious Grammar of the Greek Language. New York: Woolworth, 1871.
Goodwin, William Watson. Syntax of the Moods and Tenses of the Greek Verb. Boston: Ginn, 1893.
Kühner, Raphael. A Grammar of the Greek Language, Chiefly from the German of Raphael Kühner. Trans. Jelf, William Edward. 2nd ed. Vol. 2. Oxford: Wright, 1851.
Matthiae, August Heinrich. A Copious Greek Grammar. 5th ed. Vol. 2. London: Murray, 1832.
Simonson, Gustave. A Greek Grammar: Syntax. London: Sonnenschein, 1911.
Winer, George Benedikt. A Treatise on the Grammar of New Testament Greek. 3rd ed. Trans. Moulton, William Fiddian. Edinburgh: Clark, 1882.