Does $\pi_1$ have a right adjoint? Eilenberg and Mac Lane showed that given a group $G$ there exists a pointed topological space $X_G$ such that $\pi(X_G,\bullet)\cong G$. It is obviously a way to "invert direction" to the functor $\pi_1\colon \mathbf{Top}^\bullet\to \mathbf{Grp}$ to a functor $\mathcal K\colon \mathbf{Grp}\to \mathbf{Top}^\bullet$ such that $\pi_1(\mathcal K(G),\bullet)\cong G$ (almost by definition). This is equivalent to say that there exists a natural transformation (equivalence, in this case) between $\pi_1\circ\mathcal K$ and $\mathbf{1}_{\mathbf{Grp}}$, which turns out to resemble some sort of counity.
It would be wonderful if I could define an adjunction between the two categories in exam, given by the two functors. Everytime I try to think about some sort of unity to this hypotetical adjunction I poorly fail: considering the vast literature in the field of algebraic topology, I believe in only two possible cases. The first, nothing interesting arises from this adjunction. The second, there is no sort of adjunction.
The key point, quite trivial, to answer is: it is well known that an adjunction is uniquely determined by one among unity and counity, provided the one is universal. But $\boldsymbol\varepsilon\colon \pi_1\circ\mathcal K\to \mathbf{1}_{\mathbf{Grp}}$ is an equivalence: can I conclude that it is universal?
 A: Let $\mathcal{C}$ be the homotopy category of connected pointed CW complexes.  Then the functor $\pi_1:\mathcal{C}\to\mathbf{Grp}$ does indeed have a right adjoint.  The cleanest way to define it is to use the simplicial classifying space functor $B:\mathbf{Grp}\to\mathcal{C}$.  For the unit of the adjunction you need a natural homotopy class of maps $X\to B(\pi_1(X))$.  This can be done by obstruction theory, by induction up the skeleta of $X$.  Alternatively, one can define a more canonical map from $|SX|$ (the geometric realisation of the singular complex) to $B(\pi_1(X))$ by simplicial methods, and then use the fact that there is a natural map $|SX|\to X$ which is a homotopy equivalence when $X\in\mathcal{C}$. The first place I would look for more details would be Peter May's old book on simplicial objects in algebraic topology. 
A: This question was answered a long time ago, but let me mention a couple of relevant papers which invest on Fosco's intuition and partially confirms it.

Paul C. Kainen, Weak adjoint functors.  P.C. Math Z (1971) 122: 1.

The main point of the paper is the observation that $\mathsf{K}( -, n)$ is a weak  adjoint for $\pi_n$. The paper insists many subtleties, like (non-)preservation of limits and (non-)functoriality of the weak adjoints.  Very soon Kainen changed research topic, but it is worthy to mention also the paper below.

Paul C. Kainen, Universal coefficient theorems for generalized homology and stable cohomotopy, Pacific J. Math. 37 (1971) 397– 407.

A: In the more general setting the answer is no. Left adjoints preserve colimits and it is not true that $\pi_{1}(X\vee Y)\cong \pi_{1}(X)\ast\pi_{1}(Y)$ for all spaces $X,Y$ (even compact metric spaces). For instance, if $(\mathbb{HE},x)$ is the usual Hawaiian earring, let $X=Y=C\mathbb{HE}=\mathbb{HE}\times I/\mathbb{HE}\times\{1\}$ be the cone on the Hawaiian earring with basepoint the image of $(x,0)$ in the quotient. It is a theorem of Griffiths that $\pi_{1}(C\mathbb{HE}\vee C\mathbb{HE})$ is uncountable and not the free product of trivial groups.
