You can install and use Invedit for Minecraft, follow the simple steps below
Download invedit.
Free Download Invedit
Next extract it to somewere where you will find it(my docs, desktop .etc)
Click INVedit.exe
Press the little arrow next to the file symbol.
Choose your world.
Now change your inventory.
Press the little arrow next to the save icon and choose the world you loaded.
Note
Most servers ban for hacking although this isn’t hacking you cannot do it on SMP, because it only works on your own level.dat file.