ES Plugin add to Node server programmatically

I think you are looking for this: https://www.elastic.co/guide/en/elasticsearch/reference/2.1/integration-tests.html#changing-node-configuration

Also read this thread: Add plugins from classpath in embedded Elasticsearch client node