The deal includes an innovative "pay on return" agreement, under which TCS will be paid as and when it saves money for the port company.
TCS is installing its Integrated Port Operating System (Ipos) and supplying hardware, design, disaster recovery, business continuity processes and user training.
Ipos is based on three TCS systems - Marine Container Handling, Cargo Logistics Management and Software for Intelligent Messaging - all running on Sun servers and integrated with Oracle's 9i database. The systems also have interfaces with Forth Ports' JD Edwards financial system and radar set-up.
Forth Ports would not comment on how much the contract is worth, but confirmed payment would be based on implementation times and IT performance.
Forth Ports chief executive Charles Hammond said, "TCS demonstrated real flexibility and the scope to scale up as we continue to grow.
"The pay on return agreement we have allows us to easily measure our investment in IT and improve our service to customers."
Critical targets covered by the deal include automated invoicing, reducing invoice processing time from four weeks to a few hours, and real-time reporting for users and customers to track cargo.
TCS will support the system from its operations centre in Mumbai, with 30 consultants in India dedicated to the project. TCS is also responsible for the maintenance of hardware and applications on site.
Forth Ports owns and operates six ports in Scotland and one in Tilbury, Essex.