You can use the KeyMembers
property
http://msdn.microsoft.com/en-us/library/system.data.metadata.edm.entitytypebase.keymembers.aspx
Then providing you have only 1 key you can retrieve that and use DeclaringType
property of the EdmMember Class.
http://msdn.microsoft.com/en-us/library/system.data.metadata.edm.edmmember.aspx
As a side note I would probably consider extending EntityClassOpening
method to add your generic interface on to the opening declaration