Sounds like a MIDI loop. You have to trace your MIDI I/O and make sure that no loops exist. You get a loop when you have a MIDI output going back into a devices input. It can be tricky sometimes tracing those cables around and things that should work might not. Try checking the echo back on the keyboard or MPc if it is set to on turn it off. Sometimes using a thru instead of an out can solve a loop.
Post a diagram of your setup and I'll give it a gander...see if I can help.
When setting a MIDI network up you need to know what you want top achieve and realize that you might not be able to make one universal setup. A MIDI patchbay or splitter can help too.