Endomorphism ring of $J_0(p)$ and Hecke operators Let $J_0(p)$ be Jacobian of the modular curve $X_0(p)$ over $\mathbb Q$ where $p$ is a prime, consider the subring $\mathbb T$ inside $\newcommand{\End}{\operatorname{End}}\End_{\mathbb Q}(J_0(p))$ generated by Hecke operators $T_n$ for all $(n, p)=1$. Then what are $\mathbb T$ and $\End_{\mathbb Q}(J_0(p))$  as $\mathbb Z$-algebras? Do we have $\mathbb T=\End_{\mathbb Q}(J_0(p))$? If not, what is the index /difference?
If we tensor both sides with $\mathbb Q$, then they are equal by the work of Ribet, and the ring structure is given by products of totally real fields which are precisely coefficient fields of weight $2$ level $p$ cusp forms. Here I am more interested in the integral structures.
 A: Mazur proved that $\mathbb{T}' = \text{End}_{\mathbf{Q}}(J_0(p))$ where $\mathbb{T}'$ is generated by $\textit{all}$ the Hecke operators $T_n$ for $n\geq 1$ (including $n$ divisible by $p$). Note that $\mathbb{T}' = \mathbb{T}[U_p]=\mathbb{T}[w_p]$ where $U_p$ is the $p$th Hecke operator and $w_p = -U_p$ is the Atkin--Lehner involution (cf. Mazur's Eisenstein ideal paper, Proposition II.9.5 p. 95). So the question becomes whether $w_p$ (or $U_p$) belongs to $\mathbb{T}$. This is a local problem at maximal ideal of residue characteristic $2$. At Eisenstein maximal ideal this is known to be true, but I'm not quite sure at non-Eisenstein ideal.
A: EDIT: This is an answer to a different question, namely whether removing operators other than $U_p$ can result in a strict sub-algebra. In particular, the example given shows that $\mathbb T^{(2)}$ is of positive index in $\mathbb T$, but not that $\mathbb T$ is different from $\operatorname{End}_{\mathbb Q}(J_0(23))$ (indeed, the lemma quoted in the answer of user145307 shows that these algebras are actually equal).
To add a bit to Emmanuel's answer, at non-Eisenstein maximal ideal of residue characteristic 2, the index of $\mathbb T$ inside $\operatorname{End}_{\mathbb Q}(J_0(p))$ can indeed be strictly positive, so the answer to your question 

Do we have $\mathbb T=\operatorname{End}_{\mathbb Q}(J_0(p))$?

is negative in general. For an explicit example, you can check that for $p=23$, $\operatorname{End}_{\mathbb Q}(J_0(p))$ is isomorphic to $\mathbb Z[(1+\sqrt{5})/2]$ and that $\mathbb T$ is sent through this isomorphism to  $\mathbb Z[(1+\sqrt{5})]$ and is thus of index 2. Examples like this are plentiful.
I wondered here myself about about your question 

If not, what is the index /difference?

As I recall here (and as Emmanuel indicates), the index must be a power of 2, but my (uninformed) intuition is that not much more can be said (if you think about it in terms of algebraic number theory, you are asking about two orders in a presumably very large number field, one of them being generated by the same elements as the other except one algebraic numbers, and you are wondering what the index could be - pretty much anything is the most likely answer).
A: The very recent paper of Noah Taylor (Section 5 of https://arxiv.org/abs/2001.01814) proves that the Hecke algebra $\mathbb{T}$ generated by $T_q$ for $q \nmid p$ over $\mathbf{Z}_2$ already includes the operator $U_p$. Combining this with Emmanuel's answer describing the results of Mazur, it appears as though

$\mathbb{T} = \mathrm{End}_{\mathbb{Q}}(J_0(p))$ for all $p$.

Thus the answer to the original question is positive.
