I cannot replicate this. Step I tried
1) calibre-server --enable-local-write
2) Visit
http://localhost:8080 in a browser, click the "test library" button to see the books in the library named "test library"
3) calibredb add --with-library "http://localhost:8080/#test_library" -d file.epub
4) Click refresh in the browser
5) Newly added book is visible