How to Give an AI Agent Safe Access to an Internal API with MCP