I've been under the impression that the mid-$p$ values generally control the Type I error, and consequently confidence intervals based on mid-$p$ values control the coverage. However I have checked that this is not true with the binom.midp() function of the binomSamSize package (see below).
Is it a problem with binom.midp()?
library(binomSamSize)
coverage <- function(p, n, conf){
bounds <- binom.midp(0:n,n,conf)
low <- bounds$lower
up <- bounds$upper
covered <- which(low<p & p <up)-1
sum(dbinom(covered, n, p))
}
n <- 100
conf <- 95/100
p <- seq(0.01,0.99,length.out=100)
cover <- sapply(p, function(p){
coverage(p,n,conf)
}
)
plot(p,cover,type="l")
abline(h=conf, lty=2)

EDIT: Now I have checked the significance level of the hypothesis test based on the mid-p value (very easy to implement), and the results are in agreement:
### mid-p value for H0:{p>p0}
pv <- function(x,n,p0){
pbinom(x, n, p0)-dbinom(x,n,p0)/2
}
### typeI error
typeI <- function(p,n,alpha){
pvs <- pv(0:n,n,p)
rejected <- which(pvs<alpha)-1
sum(dbinom(rejected,n,p))
}
### test
n <- 100
alpha <- 5/100
p <- seq(0.01,0.99,length.out=100)
probs <- sapply(p, function(p){
typeI(p,n,alpha)
}
)
plot(p,probs,type="l")
abline(h=alpha,lty=2)
