An optical connector for an endoscope has a first holding member which holds a first waveguide therein, a second holding member which holds a second waveguide therein and replaceable replacement members which intervenes between the first holding member and the second holding member so that replacement waveguides intervenes between the waveguides and is optically coupled to the waveguides. The optical connector has attachment members and a positioning mechanism which positions the holding members and the replacement members relative to one another.