Current limiting resistor needed in series with one lead. When connected directly to DCC voltage, Litchfield Station, LLC recommends a 750 to 1500 ohm resistor for white LEDs. The lower the resistor value, the brigher the light, but the shorter the life of the LED. With a 1000 ohm resistor, expect a life of about 5000 illuminated hours (over 6 months of 24 hours a day, everyday). Use 1.5K to 2K resistors for colored LEDs.
The longer lead is the anode and connects to the positive voltage (blue decoder wire).