The manipulation of light in metal–organic frameworks (MOFs) to investigate the volatile organic compound vapor–MOF interactions by using optical fiber devices is demonstrated.