This will enable read only SNMP on a switch and restrict access to a single server
config t snmp-server community communityname RO 1 access-list 1 permit 192.168.1.1 exit