Looks like you may want to take one of the workshops. According to the website you must pass your exam with 70% correct and you must be bonded worth $20,000. You can get bonded just about anywhere - check with the courthouse. I think you'd need $200 upfront money for that. The exam seems to cover laws and regulations. For that you may want to take the workshop From that website:
Maryland Home Improvement Licensing Workshop
When: Beginning February 2008
The THIRD Thursday of every month,
beginning at 2:00 PM and ending at 3:00 PM (no workshop will be held in December 2007 or January 2008)
Where: 500 North Calvert Street
(Center Street entrance)
2nd floor conference room
Baltimore, Maryland 21202
Who: MHIC representatives on hand to provide guidance on obtaining a license
Taking the Exam
Online Law & Regulations
National, State & Local Links
Get a quick overview of the process of getting yourself a Maryland contractor license
To perform home improvement in Maryland you must have a Maryland contractor's License
Contact MHIC at 410-230-6175 to register or for more information