I want to connect eletro acoustic guitar and a speaker too to my Macbook.
My Macbook has only one 3.5 mm jack and for connecting 2 devices simultaneously I need to have two 3.5 mm jacks. Is there any way to connect both devices?
Which MacBook do you have? 13" non-Pro Models from "Late 2009" and on support using a standard iPhone headset with microphone in the audio jack. Anything that conforms to that pinout should work fine and give you stereo out and microphone in. (Pro and Air models support the same thing from roughly the same time period, but I didn't check which revision specifically).
You can find or build adapters that will take any input and output with 3.5mm jacks and combine them to the one jack format.
This is the first Google hit for "iPhone headset adapter", I have no idea if it's a good company to deal with, just putting it out as an example of what to look for.
Instructables also has a guide for building your own, if you're handy with a soldering iron.