The Captain is the fictional unnamed commanding officer of the British Royal Navy flagship, HMS Bedford. A minor ally, the character appeared in the 1997 James Bond film, Tomorrow Never Dies, and was portrayed by British actor Pip Torrens. The character was subsequently adapted for the film's accompanying novelisation and given the name Captain James McMahon by author Raymond Benson.
This unnamed character is captain of the Royal Navy flagship, HMS Bedford, during a standoff with the Chinese Navy in the South China Sea; prompted by the sinking of a British warship. The real orchestrator of the international crisis - media mogul, Elliot Carver - attempts to instigate conflict between the fleets by firing missiles at each of the flagships from his undetectable Stealth Ship. Thanks to the work of MI6 and the Chinese Intelligence Service, the Bedford receives an urgent message from the Admiralty ordering the fleet to search for the Stealth Ship, which is subsequently made visible to radar after James Bond breaches its hull with an improvised explosive device. With the radar contact too weak for a missile lock, the Captain attempts doing it 'the old fashioned way' by opening fire on the fleeing craft with the Bedford's 4.5 inch naval gun. 007 completely destroys the vessel by sabotaging a stolen cruise missile on-board. The Bedford and its crew are subsequently seen searching for Bond and his partner Wai Lin among the wreckage.
The character is mentioned in Raymond Benson's accompanying novelisation of the film, which closely follows Bruce Feirstein's original screenplay. He is said to share Admiral Kelly's enthusiasm, but not the man's years of experience. In the novelization, he is primarily tasked with relaying the Admiral's instructions to the rest of the fleet. The character's novelized name - James McMahon - is likely a reference to Benson's friend, to whom the novel is partially dedicated with special thanks. Notably, during April 2001, Benson traveled to Japan with McMahon to research his sixth and final James Bond novel, The Man with the Red Tattoo (2002). 
- Tomorrow Never Dies, Raymond Benson, Hodder and Stoughton, 1997, Bay of the Descending Dragon.
- (14 Sept. 2015; Original release: 1997). Tomorrow Never Dies (Blu-Ray). 20th Century Fox Home Entertainment. Event occurs at 01:55:45. "Film credits: Captain ... Pip Torrens"
- Benson, Raymond (2005-07-26). Inside the '007 The Man With The Red Tattoo Museum' (English). http://commanderbond.net.